somejkuser
somejkuser

Reputation: 9040

View Helper Manager not accessible in Module Bootstrap using ZF3

Using Zend Framework 2 I can access the ViewHelperManager doing this:

public function onBootstrap(MvcEvent $e)
   $viewHelperManager = $e->getApplication()->getServiceManager()->get('viewHelperManager');
}

This does not seem to work anymore in my Modules since starting a new project using Zend Framework 3.

Not quite sure what to do here.

Upvotes: 4

Views: 957

Answers (1)

somejkuser
somejkuser

Reputation: 9040

The Services are uppercased in Zend Framework 3 apparently.

$viewHelperManager = $e->getApplication()->getServiceManager()->get('ViewHelperManager');
var_dump(get_class($viewHelperManager));

returns string(29) "Zend\View\HelperPluginManager"

Upvotes: 6

Related Questions