Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManager::getById PHP Метод

getById() публичный Метод

public getById ( $id, $locale, $depth, $breadcrumb = false, $filter = [], $sortBy = [] )
    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, $this->getCurrentUser(), $this->permissions[PermissionTypes::VIEW]);
        $breadcrumbEntities = null;
        if ($breadcrumb) {
            $breadcrumbEntities = $this->collectionRepository->findCollectionBreadcrumbById($id);
        }
        return $this->getApiEntity($collectionEntity, $locale, $collectionChildren, $breadcrumbEntities);
    }