Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Fix the module initializer
Browse files Browse the repository at this point in the history
Initializers actually receive the module manager itself, not the module
event. As such, we have to pull the event from the module manager
instance.
  • Loading branch information
weierophinney committed Apr 18, 2016
1 parent a7bcb98 commit 793e141
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ public function getConfig()
/**
* Register a specification for the FormElementManager with the ServiceListener.
*
* @param \Zend\ModuleManager\ModuleEvent
* @param \Zend\ModuleManager\ModuleManager $moduleManager
* @return void
*/
public function init($event)
public function init($moduleManager)
{
$event = $moduleManager->getEvent();
$container = $event->getParam('ServiceManager');
$serviceListener = $container->get('ServiceListener');

Expand Down

0 comments on commit 793e141

Please sign in to comment.