Finds the breadcrumb of a collection with given id.
public findCollectionBreadcrumbById ( integer $id ) : |
||
$id | integer | |
Résultat |
/** * {@inheritdoc} */ public function getById($id, $locale, $depth = 0, $breadcrumb = false, $filter = [], $sortBy = []) { $collectionEntity = $this->collectionRepository->findCollectionById($id); if ($collectionEntity === null) { throw new CollectionNotFoundException($id); } $filter['locale'] = $locale; $collectionChildren = $this->collectionRepository->findCollectionSet($depth, $filter, $collectionEntity, $sortBy); $breadcrumbEntities = null; if ($breadcrumb) { $breadcrumbEntities = $this->collectionRepository->findCollectionBreadcrumbById($id); } return $this->getApiEntity($collectionEntity, $locale, $collectionChildren, $breadcrumbEntities); }