src/Sulu/Component/Media/SystemCollections/SystemCollectionManager.php
private function getOrCreateRoot($namespace, $title, $locale, $userId, $parent = null)
    {
        if (null !== ($collection = $this->collectionManager->getByKey($namespace, $locale))) {
            $collection->setTitle($title);

            return $collection;
        }

        return $this->createCollection($title, $namespace, $locale, $userId, $parent);
    }
private function getOrCreateRoot($namespace, $title, $locale, $userId, $parent = null)
    {
        if (null !== ($collection = $this->collectionManager->getByKey($namespace, $locale))) {
            $collection->setTitle($title);

            return $collection;
        }

        return $this->createCollection($title, $namespace, $locale, $userId, $parent);
    }
private function getOrCreateRoot ( $ namespace , $ title , $ locale , $ userId , $ parent = null ) { if ( null !== ( $ collection = $ this -> collectionManager -> getByKey ( $ namespace , $ locale ) ) ) { $ collection -> setTitle ( $ title ) ; return $ collection ; } return $ this -> createCollection ( $ title , $ namespace , $ locale , $ userId , $ parent ) ; }
Finds or create a new system-collection namespace.

@param string $namespace
@param string $title
@param string $locale
@param int $userId
@param int|null $parent id of parent collection or null for root

@return Collection
Finds or create a new system - collection namespace .