loadBreadcrumb() public method

load breadcrumb for given uuid in given language.
Deprecation:
public loadBreadcrumb ( $uuid, $languageCode, $webspaceKey ) : Sulu\Component\Content\BreadcrumbItemInterface[]
$uuid
$languageCode
$webspaceKey
return Sulu\Component\Content\BreadcrumbItemInterface[]
Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function getBreadcrumb($uuid, $webspace, $language)
 {
     $breadcrumbItems = $this->contentMapper->loadBreadcrumb($uuid, $language, $webspace);
     $result = [];
     foreach ($breadcrumbItems as $item) {
         $result[] = $this->contentMapper->load($item->getUuid(), $webspace, $language);
     }
     $result[] = $this->contentMapper->load($uuid, $webspace, $language);
     return $this->generateNavigation($result, $webspace, $language, false, null, true, false);
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function treeNavigationFunction($uuid, $context = null, $depth = 1, $loadExcerpt = false, $level = null)
 {
     $webspaceKey = $this->requestAnalyzer->getWebspace()->getKey();
     $locale = $this->requestAnalyzer->getCurrentLocalization()->getLocalization();
     if ($level !== null) {
         $breadcrumb = $this->contentMapper->loadBreadcrumb($uuid, $locale, $webspaceKey);
         // return empty array if level does not exists
         if (!isset($breadcrumb[$level])) {
             return [];
         }
         $uuid = $breadcrumb[$level]->getUuid();
     }
     return $this->navigationMapper->getNavigation($uuid, $webspaceKey, $locale, $depth, false, $context, $loadExcerpt);
 }