PHP Class Contao\CoreBundle\Image\ImageSizes

Afficher le fichier Open project: contao/core-bundle Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Doctrine\DBAL\Connection $connection, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Contao\CoreBundle\Framework\ContaoFrameworkInterface $framework ) Constructor.
getAllOptions ( ) : array Returns the image sizes as options suitable for widgets.
getOptionsForUser ( BackendUser $user ) : array Returns the image sizes for the given user suitable for widgets.

Private Methods

Méthode Description
filterImageSizes ( array $sizes, array $allowedSizes, array &$filteredSizes, string $group ) Filters image sizes.
filterOptions ( array $allowedSizes ) : array Filters the options by the given allowed sizes and returns the result.
filterResizeModes ( array $sizes, array $allowedSizes, array &$filteredSizes, string $group ) Filters resize modes.
loadOptions ( ) Loads the options from the database.

Method Details

__construct() public méthode

Constructor.
public __construct ( Doctrine\DBAL\Connection $connection, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, Contao\CoreBundle\Framework\ContaoFrameworkInterface $framework )
$connection Doctrine\DBAL\Connection
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$framework Contao\CoreBundle\Framework\ContaoFrameworkInterface

getAllOptions() public méthode

Returns the image sizes as options suitable for widgets.
public getAllOptions ( ) : array
Résultat array

getOptionsForUser() public méthode

Returns the image sizes for the given user suitable for widgets.
public getOptionsForUser ( BackendUser $user ) : array
$user Contao\BackendUser
Résultat array