src/AppBundle/Controller/BreadcrumbController.php
/**
     * Controller Reference action to be called inside the layout.
     *
     * Triggers the {@link ThemeEvents::THEME_BREADCRUMB} to receive the currently active menu chain.
     *
     * If there are no listeners attached for this event, the return value is an empty response.
     *
     * @param Request $request
     * @param string  $title
     *
     * @return Response
     *
     */
Controller Reference action to be called inside the layout.
Triggers the  ThemeEvents::THEME_BREADCRUMB to receive the currently active menu chain.

If there are no listeners attached for this event, the return value is an empty response.

@param Request $request
@param string  $title

@return Response
Controller Reference action to be called inside the layout . Triggers the ThemeEvents :: THEME_BREADCRUMB to receive the currently active menu chain . If there are no listeners attached for this event the return value is an empty response . @param Request $request @param string $title @return Response
public function breadcrumbAction(Request $request, $title = '')
    {
        if (!$this->getDispatcher()->hasListeners(ThemeEvents::THEME_BREADCRUMB)) {
            return new Response();
        }
        $active = $this->getDispatcher()->dispatch(ThemeEvents::THEME_BREADCRUMB,new SidebarMenuEvent($request))->getActive();
        $list = array();
        if($active) {
            $list[] = $active;
            while(null !== ($item = $active->getActiveChild())) {
                $list[] = $item;
                $active = $item;
            }
        }
        return $this->render(':Breadcrumb:breadcrumb.html.twig', array(
                'active' => $list,
                'title'  => $title
            ));
    }
public function breadcrumbAction ( Request $ request , $ title = '' ) { if ( ! $ this -> getDispatcher ( ) -> hasListeners ( ThemeEvents :: THEME_BREADCRUMB ) ) { return new Response ( ) ; } $ active = $ this -> getDispatcher ( ) -> dispatch ( ThemeEvents :: THEME_BREADCRUMB , new SidebarMenuEvent ( $ request ) ) -> getActive ( ) ; $ list = array ( ) ; if ( $ active ) { $ list [ ] = $ active ; while ( null !== ( $ item = $ active -> getActiveChild ( ) ) ) { $ list [ ] = $ item ; $ active = $ item ; } } return $ this -> render ( ':Breadcrumb:breadcrumb.html.twig' , array ( 'active' => $ list , 'title' => $ title ) ) ; }
Controller Reference action to be called inside the layout.
Controller Reference action to be called inside the layout .
/** @var $active MenuItemInterface */