This class was generated by the Doctrine ORM. Add your own custom repository methods below.
Наследование: extends Gedmo\Tree\Entity\Repository\NestedTreeRepository, implements Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface
Пример #1
0
 /**
  * @param $collectionId
  *
  * @return object
  *
  * @throws CollectionNotFoundException
  */
 public function getCollectionById($collectionId)
 {
     $collection = $this->collectionRepository->find($collectionId);
     if (!$collection) {
         throw new CollectionNotFoundException($collectionId);
     }
     return $collection;
 }