CurrentImageSizeExtension
class CurrentImageSizeExtension extends Twig_Extension
Class CurrentImageSizeExtension is injected as alligator.current_image_size_extension service. CurrentImageSizeExtension handles the logic and provides necessary data for managed entity in twig.
Methods
Returns the name of the extension.
{@inheritdoc}
Get extension by size for provided webPath and size
Get default extension by webpath
Get default thumbnail size
Method that sets to cache current setting from db
Method that set possible sizes based on defined possible sizes in class PossibleThumbnailSizes
Method that set possible sizes based on defined possible sizes in class PossibleThumbnailSizes
Details
at line 47
__construct(ThumbnailSettingsManager $manager)
CurrentImageSizeExtension constructor.
at line 57
string
getName()
Returns the name of the extension.
at line 65
getFunctions()
{@inheritdoc}
at line 81
string
getExtensionBySize(string $webPath, string $size)
Get extension by size for provided webPath and size
at line 97
string
getDefaultExtension($webPath, $size = null)
Get default extension by webpath
at line 111
array
getDefault()
Get default thumbnail size
at line 119
setCurrentSizeFromDb()
Method that sets to cache current setting from db
at line 129
setPossibleSizes()
Method that set possible sizes based on defined possible sizes in class PossibleThumbnailSizes
at line 137
setPossibleSizeNames()
Method that set possible sizes based on defined possible sizes in class PossibleThumbnailSizes