src/Zicht/Bundle/PageBundle/AdminMenu/TranslatePageEventPropagationBuilder.php
public function buildAndForwardEvent(Event $event)
    {
        if (!$event instanceof PageViewEvent) {
            return;
        }

        if (!$this->router) {
            return;
        }

        /** @var Page $page */
        $page = $event->getPage();
        if (!$page->getId()) {
            return;
        }

        $this->eventDispatcher->dispatch(
            AdminEvents::MENU_EVENT,
            new MenuEvent(
                $this->router->generate('zicht_page_page_view', [
                    'id' => $page->getId(),
                    '_locale' => 'zz',
                ]),
                'Vertalingen'
            )
        );

        $this->eventDispatcher->dispatch(
            AdminEvents::MENU_EVENT,
            new MenuEvent(
                $this->router->generate('zicht_page_page_view', [
                    'id' => $page->getId(),
                    '_locale' => $page->getLanguage(),
                ]),
                'Pagina herladen'
            )
        );
    }
public function buildAndForwardEvent(Event $event)
    {
        if (!$event instanceof PageViewEvent) {
            return;
        }

        if (!$this->router) {
            return;
        }

        /** @var Page $page */
        $page = $event->getPage();
        if (!$page->getId()) {
            return;
        }

        $this->eventDispatcher->dispatch(
            AdminEvents::MENU_EVENT,
            new MenuEvent(
                $this->router->generate('zicht_page_page_view', [
                    'id' => $page->getId(),
                    '_locale' => 'zz',
                ]),
                'Vertalingen'
            )
        );

        $this->eventDispatcher->dispatch(
            AdminEvents::MENU_EVENT,
            new MenuEvent(
                $this->router->generate('zicht_page_page_view', [
                    'id' => $page->getId(),
                    '_locale' => $page->getLanguage(),
                ]),
                'Pagina herladen'
            )
        );
    }
public function buildAndForwardEvent ( Event $ event ) { if ( ! $ event instanceof PageViewEvent ) { return ; } if ( ! $ this -> router ) { return ; } /** @var Page $page */ $ page = $ event -> getPage ( ) ; if ( ! $ page -> getId ( ) ) { return ; } $ this -> eventDispatcher -> dispatch ( AdminEvents :: MENU_EVENT , new MenuEvent ( $ this -> router -> generate ( 'zicht_page_page_view' , [ 'id' => $ page -> getId ( ) , '_locale' => 'zz' , ] ) , 'Vertalingen' ) ) ; $ this -> eventDispatcher -> dispatch ( AdminEvents :: MENU_EVENT , new MenuEvent ( $ this -> router -> generate ( 'zicht_page_page_view' , [ 'id' => $ page -> getId ( ) , '_locale' => $ page -> getLanguage ( ) , ] ) , 'Pagina herladen' ) ) ; }
Build the relevant event and forward it.

@param \Symfony\Component\EventDispatcher\Event $event
@return mixed|void
Build the relevant event and forward it .