Metoda wyzwalna podczas renderowania widoku i dodająca budująca menu jako submenu breadcrumbs

@return void
179562
public function handle()
    {
        if (!$this->passesAuthorization()) {
            return;
        }
        $code    = from_route('code');
        $id      = from_route('id');
        $locale  = is_null($code) ? app()->getLocale() : $code;
        $locale  = $locale == null ? 'en' : $locale;
        $current = Languages::where('code', $locale)->first();
        $this->createMenu();

        $acl = app('antares.acl')->make('antares/translations');

        if ($acl->can('add-language')) {
            $this->handler
                    ->add('translations-add-language', '^:translations-breadcrumb')
                    ->title(trans('antares/translations::messages.manage_languages'))
                    ->icon('zmdi-format-list-bulleted')
                    ->link(handles('antares::translations/languages/index'));
        }
        if ($acl->can('import-translations')) {
            $this->handler
                    ->add('translations-import', '^:translations-breadcrumb')
                    ->title(trans('antares/translations::messages.import'))
                    ->icon('zmdi-arrow-left-bottom')
                    ->link(handles('antares::translations/languages/import/' . $current->code . '/' . $id));
        }
        if ($acl->can('export-translations')) {
            $this->handler
                    ->add('translations-export', '^:translations-breadcrumb')
                    ->title(trans('antares/translations::messages.export'))
                    ->icon('zmdi-arrow-right-top')
                    ->link(handles('antares::translations/languages/export/' . $current->code . '/' . $id))
                    ->attributes([
                        'class'            => 'export-translations',
                        'data-title'       => trans('antares/translations::messages.export_translations_ask'),
                        'data-description' => trans('antares/translations::messages.export_translations_description')
            ]);
        }
        if ($acl->can('publish-translations')) {
            $this->handler
                    ->add('translations-publish', '^:translations-breadcrumb')
                    ->title(trans('antares/translations::messages.publish'))
                    ->icon('zmdi-check-all')
                    ->link(handles('antares::translations/languages/publish/' . $id))
                    ->attributes([
                        'class'            => 'publish-translations',
                        'data-title'       => trans('antares/translations::messages.publish_translations_ask'),
                        'data-description' => trans('antares/translations::messages.publish_translations_description')
            ]);
        }
    }
689608
public function createBreadcrumb()
    {
        if (null === $this->breadcrumb) {
            $this->createBreadcrumbRoot();

            // Retrieve the current page.
            $currentPage = $this->pageHelper->getCurrent();

            // If not found look for a parent
            if (null === $currentPage && null !== $request = $this->pageHelper->getRequest()) {
                // TODO create a route finder ? (same in AdminBundle ResourceHelper)
                $routeName = $request->attributes->get('_route');
                $i18nRouterClass = 'JMS\I18nRoutingBundle\Router\I18nRouterInterface';
                if (interface_exists($i18nRouterClass) && $this->router instanceof $i18nRouterClass) {
                    $route = $this->router->getOriginalRouteCollection()->get($routeName);
                } else {
                    $route = $this->router->getRouteCollection()->get($routeName);
                }
                if (null !== $route) {
                    $cmsOptions = $route->getOption('_cms');
                    if (null !== $cmsOptions
                        && array_key_exists('parent', $cmsOptions)
                        && 0 < strlen($cmsOptions['parent'])
                    ) {
                        $currentPage = $this->pageHelper->findByRoute($cmsOptions['parent']);
                    }
                }
            }

            // If found, build the breadcrumb
            if (null !== $currentPage) {
                $repository = $this->pageHelper->getPageRepository();
                $pages = $repository->findParentsForBreadcrumb($currentPage);

                // Fill the menu
                foreach ($pages as $page) {
                    if ($page['dynamicPath']) {
                        $params = ['uri' => null];
                    } else {
                        $params = ['route' => $page['route']];
                    }
                    $this->breadcrumb
                        ->addChild('page-' . $page['id'], $params)
                        ->setLabel($page['breadcrumb']);
                    $this->tagManager->addTags(sprintf('%s[id:%s]', $repository->getCachePrefix(), $page['id']));
                }
            }
        }

        return $this->breadcrumb;
    }
380448
public function renderSidebar()
    {
        if (!$this->curSubCategories) {
            return '';
        }

        $url = ltrim(wei()->request->getPathInfo(), '/');

        foreach ($this->curSubCategories as $i => $subCategory) {
            foreach ($subCategory['navs'] as $j => $nav) {
                if ($nav['url'] == $url) {
                    $this->curSubCategories[$i]['navs'][$j]['active'] = true;
                }
            }
        }

        return $this->view->render('@admin/admin/sidebar.php', [
            'curSubCategories' => $this->curSubCategories,
        ]);
    }
512909
protected function loadBreadcrumbs()
    {
        breadcrumbs()->register($this->breadcrumbsContainer, function(Builder $bc) {
            $bc->parent('main');

            if ( ! empty($this->breadcrumbsItems)) {
                foreach ($this->breadcrumbsItems as $crumb) {
                    $bc->push($crumb['title'], $crumb['url'], $crumb['data'] ?? []);
                }
            }
        });
    }
830496
public function render()
    {
        parent::render();

        $oParentView = $this->getParent();

        // add content for main menu
        $oContentList = oxNew(\OxidEsales\Eshop\Application\Model\ContentList::class);
        $oContentList->loadMainMenulist();
        $oParentView->setMenueList($oContentList);

        return;
    }
1109168
public function showAction()
    {
        $this->setPageTitle(sprintf($this->_('Show %s'), $this->getTopic()));

        $model    = $this->getModel();
        // NEAR FUTURE:
        // $this->addSnippet('ModelVerticalTableSnippet', 'model', $model, 'class', 'displayer');
        $repeater = $model->loadRepeatable();
        $table    = $this->getShowTable();
        $table->setOnEmpty(sprintf($this->_('Unknown %s.'), $this->getTopic(1)));
        $table->setRepeater($repeater);
        $table->tfrow($this->createMenuLinks($this->menuShowIncludeLevel), array('class' => 'centerAlign'));

        if ($menuItem = $this->findAllowedMenuItem('edit')) {
            $table->tbody()->onclick = array('location.href=\'', $menuItem->toHRefAttribute($this->getRequest()), '\';');
        }

        $tableContainer = \MUtil_Html::create('div', array('class' => 'table-container'), $table);
        $this->html[] = $tableContainer;
    }
15393
protected function setBreadcrumbEditFile()
    {
        $breadcrumbs = array();

        $breadcrumbs[] = array(
            'url' => $this->url('admin'),
            'text' => $this->text('Dashboard')
        );

        $breadcrumbs[] = array(
            'url' => $this->url('admin/content/file'),
            'text' => $this->text('Files')
        );

        $this->setBreadcrumbs($breadcrumbs);
    }
955184
public function Breadcrumbs()
    {
        $parts = explode(self::$breadcrumbs_delimiter, $this->parentController->Breadcrumbs());
        // The last part is never a link, need to recreate
        array_pop($parts);
        array_push($parts,
            '<a href="' . $this->parentController->Link() . '">' . $this->parentController->Title . '</a>');

        //Merge
        array_pop($this->crumbs);
        array_push($this->crumbs, $this->Title);

        $parts = array_merge($parts, $this->crumbs);

        return implode(self::$breadcrumbs_delimiter, $parts);
    }
214232
private function registerBreadcrumbsPackage()
    {
        $this->registerProvider(BreadcrumbsServiceProvider::class);

        $this->alias('Breadcrumbs', \Arcanedev\Breadcrumbs\Facades\Breadcrumbs::class);
    }
335602
protected function setBreadcrumbEditProductClass()
    {
        $breadcrumbs = array();

        $breadcrumbs[] = array(
            'url' => $this->url('admin'),
            'text' => $this->text('Dashboard')
        );

        $breadcrumbs[] = array(
            'text' => $this->text('Product classes'),
            'url' => $this->url('admin/content/product-class')
        );

        $this->setBreadcrumbs($breadcrumbs);
    }
809584
public function addBreadCrumbs($breadCrumbs = null) {
		if (empty($breadCrumbs) || !is_array($breadCrumbs)) {
			return;
		}

		foreach ($breadCrumbs as $breadCrumbInfo) {
			if (empty($breadCrumbInfo)) {
				continue;
			}

			$link = null;
			if (is_array($breadCrumbInfo)) {
				$name = array_shift($breadCrumbInfo);
				$link = array_shift($breadCrumbInfo);
			} else {
				$name = $breadCrumbInfo;
			}
			if (empty($name)) {
				continue;
			}

			$this->Html->addCrumb(h($name), $link);
		}
	}
685328
public function displayBreadcrumbs()
    {
        if (!Framework::instance()->getThemeOption('display_breadcrumbs')) {
            return false;
        }

        if (!is_front_page() && !(is_home() && 'page' !== get_option('show_on_front'))) {
            return true;
        }

        return false;
    }
670847
private function generateBreadcrumb()
    {
        $this->breadcrumbMenus = collect();
        $this->addBreadcrumbLink('Home', '/', 'home');

        $prevTitle = 'Home';
        $navs = $this->selectedNavigation->getParentsAndYou();
        foreach ($navs as $k => $nav) {

            if ($nav->title != $prevTitle) {
                $url = (is_slug_url($nav->slug) ? $nav->slug : url($nav->url));
                $this->addBreadcrumbLink($nav->title, $url);
            }

            $prevTitle = $nav->title;
        }
    }
1177631
private function createBreadcrumbRoot()
    {
        if (null === $this->breadcrumb) {
            if (null === $home = $this->pageHelper->getHomePage()) {
                throw new \RuntimeException('Home page not found.');
            }
            $this->breadcrumb = $this->factory->createItem('root', [
                'childrenAttributes' => [
                    'class' => 'breadcrumb hidden-xs',
                ],
            ]);
            $this->tagManager->addTags($home->getEntityTag());
        }
    }
467658
protected function setBreadcrumb()
    {
        $url = config('app.url');
        $navItems = $this->urlParentNavs;

        $this->breadcrumbItems = collect();

        // add nav items
        foreach ($navItems as $k => $page) {
            $this->addBreadcrumbLink($page->title, $page->url, $page->icon);
        }

        // reserved word (create, edit, show)
        if ($word = $this->checkIfReservedWordInUrl()) {
            $this->addBreadcrumbLink(ucfirst($word));
        }
    }
837161
public function renderItems()
    {
        if (empty($this->items))
            return;

        Html::addCssClass($this->htmlOptions, Enum::BREADCRUMBS);
        echo \CHtml::openTag($this->tagName, $this->htmlOptions);
        foreach ($this->items as $label => $options) {
            $this->renderItem($label, $options);
        }
        echo \CHtml::closeTag($this->tagName);

    }
371387
public function index()
    {
        $this->loadModel('Menu.Menus');
        $menus = $this->Menus->find()->all();

        $this->title(__d('menu', 'Menus List'));
        $this->set('menus', $menus);
        $this->Breadcrumb->push('/admin/menu/manage');
    }