src/Phlexible/Bundle/GuiBundle/Controller/StatusController.php
public function listenersAction()
    {
        $dispatcher = $this->get('event_dispatcher');

        $listenerNames = array_keys($dispatcher->getListeners());
        sort($listenerNames);

        $output = '<pre>';
        $output .= str_repeat('=', 3).str_pad(' Events / Listeners ', 80, '=').PHP_EOL.PHP_EOL;

        foreach ($listenerNames as $listenerName) {
            $listeners = $dispatcher->getListeners($listenerName);

            $output .= $listenerName.' (<a href="#'.$listenerName.'">'.count($listeners).' listeners</a>)'.PHP_EOL;
        }

        foreach ($listenerNames as $listenerName) {
            $listeners = $dispatcher->getListeners($listenerName);

            if (!$listenerName) {
                $listenerName = '(global)';
            }

            $output .= PHP_EOL.PHP_EOL.str_repeat('-', 3).'<a name="'.$listenerName.'"></a>'.str_pad(' '.$listenerName.' ', 80, '-').PHP_EOL.PHP_EOL;

            foreach ($listeners as $listener) {
                if (is_array($listener)) {
                    if (is_object($listener[0])) {
                        $listener = get_class($listener[0]).'->'.$listener[1].'()';
                    } else {
                        $listener = implode('::', $listener).'()';
                    }
                }
                $output .= '* '.$listener.PHP_EOL;
            }
        }

        return new Response($output);
    }
public function listenersAction()
    {
        $dispatcher = $this->get('event_dispatcher');

        $listenerNames = array_keys($dispatcher->getListeners());
        sort($listenerNames);

        $output = '<pre>';
        $output .= str_repeat('=', 3).str_pad(' Events / Listeners ', 80, '=').PHP_EOL.PHP_EOL;

        foreach ($listenerNames as $listenerName) {
            $listeners = $dispatcher->getListeners($listenerName);

            $output .= $listenerName.' (<a href="#'.$listenerName.'">'.count($listeners).' listeners</a>)'.PHP_EOL;
        }

        foreach ($listenerNames as $listenerName) {
            $listeners = $dispatcher->getListeners($listenerName);

            if (!$listenerName) {
                $listenerName = '(global)';
            }

            $output .= PHP_EOL.PHP_EOL.str_repeat('-', 3).'<a name="'.$listenerName.'"></a>'.str_pad(' '.$listenerName.' ', 80, '-').PHP_EOL.PHP_EOL;

            foreach ($listeners as $listener) {
                if (is_array($listener)) {
                    if (is_object($listener[0])) {
                        $listener = get_class($listener[0]).'->'.$listener[1].'()';
                    } else {
                        $listener = implode('::', $listener).'()';
                    }
                }
                $output .= '* '.$listener.PHP_EOL;
            }
        }

        return new Response($output);
    }
public function listenersAction ( ) { $ dispatcher = $ this -> get ( 'event_dispatcher' ) ; $ listenerNames = array_keys ( $ dispatcher -> getListeners ( ) ) ; sort ( $ listenerNames ) ; $ output = '<pre>' ; $ output .= str_repeat ( '=' , 3 ) . str_pad ( ' Events / Listeners ' , 80 , '=' ) . PHP_EOL . PHP_EOL ; foreach ( $ listenerNames as $ listenerName ) { $ listeners = $ dispatcher -> getListeners ( $ listenerName ) ; $ output .= $ listenerName . ' (<a href="#' . $ listenerName . '">' . count ( $ listeners ) . ' listeners</a>)' . PHP_EOL ; } foreach ( $ listenerNames as $ listenerName ) { $ listeners = $ dispatcher -> getListeners ( $ listenerName ) ; if ( ! $ listenerName ) { $ listenerName = '(global)' ; } $ output .= PHP_EOL . PHP_EOL . str_repeat ( '-' , 3 ) . '<a name="' . $ listenerName . '"></a>' . str_pad ( ' ' . $ listenerName . ' ' , 80 , '-' ) . PHP_EOL . PHP_EOL ; foreach ( $ listeners as $ listener ) { if ( is_array ( $ listener ) ) { if ( is_object ( $ listener [ 0 ] ) ) { $ listener = get_class ( $ listener [ 0 ] ) . '->' . $ listener [ 1 ] . '()' ; } else { $ listener = implode ( '::' , $ listener ) . '()' ; } } $ output .= '* ' . $ listener . PHP_EOL ; } } return new Response ( $ output ) ; }
Show events.

@return Response
@Route("/listeners", name="gui_status_listeners")
Show events .