Sulu\Bundle\MediaBundle\Entity\CollectionRepositoryInterface::findCollectionByKey PHP Méthode

findCollectionByKey() public méthode

Finds collection by key.
public findCollectionByKey ( string $key ) : Collection
$key string
Résultat Collection
    public function findCollectionByKey($key);

Usage Example

Exemple #1
0
 /**
  * {@inheritdoc}
  */
 public function getByKey($key, $locale)
 {
     $collection = $this->collectionRepository->findCollectionByKey($key);
     if (!$collection) {
         return;
     }
     return $this->getApiEntity($collection, $locale);
 }