Skip to content

Commit

Permalink
Fix deprecated Event::getName usage
Browse files Browse the repository at this point in the history
  • Loading branch information
soullivaneuh committed May 1, 2015
1 parent 04ec6b7 commit 81f95cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Templating/Helper/BlockHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public function renderEvent($name, array $options = array())
'template_code' => $name,
'event_name' => $eventName,
'blocks' => $this->getEventBlocks($event),
'listeners' => $this->getEventListeners($event),
'listeners' => $this->getEventListeners($eventName),
);
}

Expand All @@ -273,15 +273,15 @@ protected function getEventBlocks(BlockEvent $event)
}

/**
* @param BlockEvent $event
* @param string $eventName
*
* @return array
*/
protected function getEventListeners(BlockEvent $event)
protected function getEventListeners($eventName)
{
$results = array();

foreach ($this->eventDispatcher->getListeners($event->getName()) as $listener) {
foreach ($this->eventDispatcher->getListeners($eventName) as $listener) {
if (is_object($listener[0])) {
$results[] = get_class($listener[0]);
} else if (is_string($listener[0])) {
Expand Down

0 comments on commit 81f95cc

Please sign in to comment.