PHP Class Contao\CoreBundle\Image\ImageSizes

Show file Open project: contao/core-bundle Class Usage Examples

Public Methods

Method 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

Method 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 method

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 method

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

getOptionsForUser() public method

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