Function preparRessourceForm in module.php

Hi,

I try to underdstand how my module.php file works, but I could not find which class are behind this part of code:

public function prepareResourceForm(Event $event)
    {
       $view = $event->getTarget();
        $view->headLink()->appendStylesheet($view->assetUrl(', ));
        $view->headScript()->appendFile($view->assetUrl( ,  ));
        $view->headScript()->appendFile($view->assetUrl( .., ));
        $view->headScript()->appendScript(sprintf(
            'var valueSuggestProxyUrl = "%s";',
            $view->escapeJs($view->url('admin/value-suggest/proxy'))
        ));
    }

What I wish to know , from which types are the variables $view , $view->headLink() etc…

any help?

I think $view is a Zend\View\Renderer\PhpRenderer.
headLink() and headScript() methods are helpers (invokable classes which render a specific part of HTML code).

The ZF3 documentation about View component can help you. :wink:

The Omeka S documentation also contains a page about Zend\View\Model\ViewModel which can help you.

Oh, the get_class() PHP function is useful :stuck_out_tongue: