Web service per la restituzione di un breadcrumbs in base ad un id

@return ViewModel
12120
public function breadcrumbsAction() 
	{
	    $default = 'dashboard';
	    $id = $this->getRequest()->getQuery('id', $default);
	    $pos = strpos($id, '/');
	    $id = false !== $pos ? substr($id, 0, $pos) : $id;
        $view = $this->getServiceLocator()->get('Zend\View\Renderer\PhpRenderer');
        $navigation = $view->navigation('navigation');
        $container = $navigation->getContainer();
        $page = $container->findOneBy('fragment', $id);
        $page = null === $page ? $container->findOneBy('fragment', $default) : $page;
        $page->setActive(true);
        
        $viewModel = new ViewModel(array(
            'breadcrumbs' => $navigation->breadcrumbs()
        		->setPartial('breadcrumbs')->setRenderInvisible(true)->setMinDepth(0)
        ));
        $viewModel->setTerminal(true);
        
        return $viewModel;
	}
308596
public function closeAllTabsAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

        $view = new ViewModel();
        $view->melisKey = $melisKey;
        return $view;
    }
1194704
public function getPageMapper()
    {
        if (null === $this->pageMapper) {
            $this->pageMapper = $this->serviceLocator->get('playgroundcms_page_mapper');
        }

        return $this->pageMapper;
    }
974741
public function indexAction()
    {
        if(!$this->identity()) {
          return $this->redirect()->toRoute($this->getOptions()->getLoginRedirectRoute());
        }
      
        $users = $this->getEntityManager()->getRepository('CsnUser\Entity\User')->findall();
        return new ViewModel(array('users' => $users));
    }
386674
public function canEditPagesAction()
    {
        $melisCoreAuth = $this->getServiceLocator()->get('MelisCoreAuth');
        $xmlRights = $melisCoreAuth->getAuthRights();
    	$rightsObj = simplexml_load_string($xmlRights);
        $sectionId = MelisCmsRightsService::MELISCMS_PREFIX_PAGES;
        if (empty($rightsObj->$sectionId->id))
            $edit = 0;
        else 
            $edit = 1;
            
        $result = array(
            'success' => 1,
            'edit' => $edit
        );
         
        return new JsonModel($result);
    }
568184
public function renderCalendarLeftmenuAction()
    {
    	$melisKey = $this->params()->fromRoute('melisKey', '');
    	$view = new ViewModel();
    	$view->melisKey = $melisKey;
    	return $view;
    }
158913
public function getBreadcrumb() {
		$breadcrumb = [];

		// handle not set active node
		if (!isset($this->_nodes[$this->_active_path])) {
			throw new \Exception(__METHOD__.': you did not set an active node so you cannot retrieve a breadcrumb.');
			return;
		}

		// get actual node
		$actual = $this->_nodes[$this->_active_path];
		array_unshift($breadcrumb, $actual);

		// loop to the top
		while (isset($this->_nodes[$actual['parent']])) {
			$actual =& $this->_nodes[$actual['parent']];
			array_unshift($breadcrumb, $actual);
		}

		return $breadcrumb;
	}
774910
public function Breadcrumbs()
    {
        $ownerClassName = $this->OwnerClassName;

        if ($owner = $ownerClassName::get()->filter('ElementalAreaID', $this->ID)->first()) {
            return DBField::create_field('HTMLText', sprintf(
                '<a href="%s">%s</a>',
                $owner->CMSEditLink(),
                $owner->Title
            ));
        }

        return null;
    }
1058159
public function breadcrumbs()
    {
        $links = [];
        $breadcrumbs = $this->crumbs($this->request->segments());
        foreach ($breadcrumbs as $name => $url):
            $links[] = '<a href="' . $url . '" class="breadcrumb">' . ucwords($name) . '</a>';
        endforeach ;
        return $links;
    }
134176
public static function getMenu()
    {
        return (new \Mmi\Navigation\NavigationConfigElement)
            ->setLabel('menu.text.container')
            ->setIcon('fa-align-left')
            ->setUri('#')
            ->addChild((new \Mmi\Navigation\NavigationConfigElement)
                ->setLabel('menu.text.index')
                ->setIcon('fa-table')
                ->setModule('cmsAdmin')
                ->setController('text'))
            ->addChild((new \Mmi\Navigation\NavigationConfigElement)
                ->setLabel('menu.text.edit')
                ->setIcon('fa-plus')
                ->setModule('cmsAdmin')
                ->setController('text')
                ->setAction('edit'));
    }
530835
public function identityMenuAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

        $melisCoreAuth = $this->serviceLocator->get('MelisCoreAuth');

        $userAuthDatas = $melisCoreAuth->getStorage()->read();

        $view = new ViewModel();
        $view->melisKey = $melisKey;
        $view->setVariable('userAuthDatas', $userAuthDatas);

        return $view;
    }
445289
public function &GetBreadcrumb()
    {
        $oBreadCrumb = &$this->GetFromInternalCache('oCategoryBreadcrumb');
        if (is_null($oBreadCrumb)) {
            $oBreadCrumb = &TdbShopCategoryList::GetCategoryPath($this->id, null, $this->GetLanguage());
            $this->SetInternalCache('oCategoryBreadcrumb', $oBreadCrumb);
        } else {
            $oBreadCrumb->GoToStart();
        }

        return $oBreadCrumb;
    }
297201
public function getBreadcrumbsData()
    {
        //ustawianie danych breadcrumbów
        return is_array($this->_breadcrumbsData) ? $this->_breadcrumbsData : ($this->_breadcrumbsData = self::$_navigation->getBreadcrumbs());
    }
1092442
public function render()
    {
        $htmlSrc = '<' . $this->containerTag . ' class="' . $this->breadcrumbClass . '">' . PHP_EOL;
        foreach ($this->links as $key => $row) {
            $htmlSrc .= '<' . $this->itemTag . '>' . $row . '</' . $this->itemTag . '>' . PHP_EOL;
        }
        $htmlSrc .= '</' . $this->containerTag . '>' . PHP_EOL;

        return $htmlSrc;
    }
1293700
public function indexAction()
    {
        $form = $this->formSearch;

        if ($this->getRequest()
                 ->isPost()
        ) {
            $form->setData(
                $this->params()
                     ->fromPost()
            );

            if ($form->isValid()) {
                return $this->redirect()
                            ->toRoute(
                                'mp3-search',
                                [
                                    'name' => $this->params()
                                                   ->fromPost('name')
                                ]
                            );
            }
        }

        $service = $this->serviceIndex
            ->index(
                $this->params()
                     ->fromRoute()
            );

        return (new ViewModel())
            ->setTemplate('mp3/mp3/search')
            ->setVariables(
                [
                    'form'          => $form,
                    'paginator'     => $service['paginator'],
                    'path'          => $service['path'],
                    'totalLength'   => $service['totalLength'],
                    'totalFileSize' => $service['totalFileSize'],
                    'search'        => $service['search'],
                    'dir'           => $this->params()
                                            ->fromRoute('dir')
                ]
            );
    }
73026
public function getBreadCrumb()
    {
        if ('search' == $this->getListType()) {
            $paths = $this->_getSearchBreadCrumb();
        // @deprecated since v5.3 (2016-06-17); Listmania will be moved to an own module.
        } elseif ('recommlist' == $this->getListType()) {
            $paths = $this->_getRecommendationListBredCrumb();
            // END deprecated
        } elseif ('vendor' == $this->getListType()) {
            $paths = $this->_getVendorBreadCrumb();
        } else {
            $paths = $this->_getCategoryBreadCrumb();
        }

        return $paths;
    }
266541
public function listAction()
    {
        $params     = $this->params();
        $request    = $this->getRequest();
        $bodyOnly   = $request->isXmlHttpRequest();
        $page       = $params->fromRoute( 'page',
            $request->getPost( 'page',
                $request->getQuery( 'page', 1 )
            )
        );

        $view = new ViewModel( array(
            'paginator' => $this->getPaginator(),
            'page'      => ( (int) $page ) ?: 1,
            'format'    => $bodyOnly,
        ) );

        if ( $bodyOnly )
        {
            $view->setTerminal( true );
        }

        return $view;
    }