class AlbumExtension extends Twig_Extension

Class AlbumExtension is injected as twig.extension.album service. AlbumExtension handles the logic and provides necessary data for managed entity in twig.

Methods

__construct(AlbumsManager $manager)

Constructor

getFunctions()

{@inheritdoc}

string
getAlbumsFromCache(string $theme, string $locale)

Retrieve albums from cache for provided theme and locale

mixed
getAlbumsFromDB(string $theme, string $locale)

Get albums from database for provided theme and locale

array
getAlbumsForBlock(array $ids)

Get albums for blocks by id

string
getName()

Returns the name of the extension.

Details

at line 30
__construct(AlbumsManager $manager)

Constructor

Parameters

AlbumsManager $manager

at line 38
getFunctions()

{@inheritdoc}

at line 57
string getAlbumsFromCache(string $theme, string $locale)

Retrieve albums from cache for provided theme and locale

Parameters

string $theme
string $locale

Return Value

string

Exceptions

NoResultException
NonUniqueResultException

at line 72
mixed getAlbumsFromDB(string $theme, string $locale)

Get albums from database for provided theme and locale

Parameters

string $theme
string $locale

Return Value

mixed

Exceptions

NoResultException
NonUniqueResultException

at line 83
array getAlbumsForBlock(array $ids)

Get albums for blocks by id

Parameters

array $ids

Return Value

array

at line 93
string getName()

Returns the name of the extension.

Return Value

string The extension name