PHP Class Sulu\Component\Media\SystemCollections\SystemCollectionManager

Inheritance: implements Sulu\Component\Media\SystemCollections\SystemCollectionManagerInterface
Exibir arquivo Open project: sulu/sulu Class Usage Examples

Public Methods

Method Description
__construct ( array $config, Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface $collectionManager, Doctrine\ORM\EntityManagerInterface $entityManager, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenProvider = null, Sulu\Component\Cache\CacheInterface $cache, $locale )
getSystemCollection ( $key )
isSystemCollection ( $id )
warmUp ( )

Private Methods

Method Description
buildSystemCollections ( string $locale, integer $userId ) : array Go thru configuration and build all system collections.
createCollection ( string $title, string $key, string $locale, integer $userId, integer | null $parent = null, integer | null $id = null ) : Collection Creates a new collection.
getOrCreateCollection ( string $key, array $localizedTitles, integer $userId, integer | null $parent ) : Collection Finds or create a new system-collection.
getOrCreateRoot ( string $namespace, string $title, string $locale, integer $userId, integer | null $parent = null ) : Collection Finds or create a new system-collection namespace.
getSystemCollections ( ) : array Returns system collections.
getUserId ( ) : integer Returns current user.
iterateOverCollections ( $children, $userId, null $parent = null, string $namespace = '' ) : array Iterates over an array of children collections, creates them.

Method Details

__construct() public method

public __construct ( array $config, Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface $collectionManager, Doctrine\ORM\EntityManagerInterface $entityManager, Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface $tokenProvider = null, Sulu\Component\Cache\CacheInterface $cache, $locale )
$config array
$collectionManager Sulu\Bundle\MediaBundle\Collection\Manager\CollectionManagerInterface
$entityManager Doctrine\ORM\EntityManagerInterface
$tokenProvider Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface
$cache Sulu\Component\Cache\CacheInterface

getSystemCollection() public method

public getSystemCollection ( $key )

isSystemCollection() public method

public isSystemCollection ( $id )

warmUp() public method

public warmUp ( )