getImageSizes() public static méthode

Return all image sizes as array
Deprecation: Deprecated since Contao 4.1, to be removed in Contao 5. Use the contao.image.image_sizes service instead.
public static getImageSizes ( ) : array
Résultat array The available image sizes
Exemple #1
0
 /**
  * @param array $arrSettings
  * @return array
  */
 public function dcaDataFields($arrSettings = array())
 {
     $arrMandatory = $arrSettings['arrMandatory'];
     $this->overwriteMandatory = $arrSettings['addMandatory'] ? true : false;
     $userID = $this->getUserID();
     $fields = array('id' => array('sql' => 'int(10) unsigned NOT NULL auto_increment'), 'tstamp' => array('sql' => "int(10) unsigned NOT NULL default '0'"), 'title' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['title'], 'inputType' => 'text', 'exclude' => true, 'sorting' => true, 'search' => true, 'eval' => array('maxlength' => 255, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'title', '1'), 'tl_class' => 'w50', 'fmEditable' => true, 'fmGroup' => 'teaser'), 'sql' => "varchar(255) NOT NULL default ''"), 'alias' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['alias'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('rgxp' => 'alias', 'maxlength' => 128, 'tl_class' => 'w50', 'unique' => true, 'fmEditable' => true, 'fmGroup' => 'teaser'), 'save_callback' => array(array('DCAModuleData', 'generateAlias')), 'sql' => "varchar(128) COLLATE utf8_bin NOT NULL default ''"), 'info' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['info'], 'inputType' => 'text', 'exclude' => true, 'search' => true, 'eval' => array('maxlength' => 255, 'tl_class' => 'clr long', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'info'), 'fmEditable' => true, 'fmGroup' => 'teaser'), 'sql' => "varchar(255) NOT NULL default ''"), 'description' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['description'], 'inputType' => 'textarea', 'exclude' => true, 'search' => true, 'eval' => array('tl_class' => 'clr', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'description'), 'rte' => 'tinyMCE', 'fmEditable' => true, 'fmGroup' => 'teaser'), 'sql' => "mediumtext NULL"), 'author' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['author'], 'default' => $userID, 'exclude' => true, 'filter' => true, 'inputType' => 'select', 'foreignKey' => 'tl_user.name', 'eval' => array('doNotCopy' => true, 'chosen' => true, 'includeBlankOption' => true, 'mandatory' => true, 'tl_class' => 'w50', 'fmEditable' => true, 'fmGroup' => 'author'), 'relation' => array('type' => 'hasOne', 'load' => 'eager'), 'sql' => "int(10) unsigned NOT NULL default '0'"), 'date' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['date'], 'default' => time(), 'exclude' => true, 'filter' => true, 'sorting' => true, 'flag' => 8, 'inputType' => 'text', 'eval' => array('rgxp' => 'date', 'doNotCopy' => true, 'datepicker' => true, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'date'), 'tl_class' => 'w50 wizard', 'fmEditable' => true, 'fmGroup' => 'date'), 'sql' => "int(10) unsigned NULL"), 'time' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['time'], 'default' => time(), 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'time', 'doNotCopy' => true, 'tl_class' => 'w50', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'time'), 'fmEditable' => true, 'fmGroup' => 'date'), 'sql' => "int(10) unsigned NULL"), 'source' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['source'], 'default' => 'default', 'exclude' => true, 'inputType' => 'select', 'options' => array('default', 'internal', 'external'), 'reference' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack'], 'eval' => array('submitOnChange' => true, 'helpwizard' => true, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'source'), 'fmEditable' => true, 'fmGroup' => 'source'), 'sql' => "varchar(32) NOT NULL default ''"), 'url' => array('label' => &$GLOBALS['TL_LANG']['MSC']['url'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('decodeEntities' => true, 'maxlength' => 255, 'tl_class' => 'w50', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'url', '1'), 'fmEditable' => true, 'fmGroup' => 'source'), 'sql' => "varchar(255) NOT NULL default ''"), 'jumpTo' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['jumpTo'], 'exclude' => true, 'inputType' => 'pageTree', 'foreignKey' => 'tl_page.title', 'eval' => array('fieldType' => 'radio', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'jumpTo', '1'), 'fmEditable' => true, 'fmGroup' => 'source'), 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'belongsTo', 'load' => 'lazy')), 'target' => array('label' => &$GLOBALS['TL_LANG']['MSC']['target'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50 m12', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'target'), 'fmEditable' => true, 'fmGroup' => 'source'), 'sql' => "char(1) NOT NULL default ''"), 'addEnclosure' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['addEnclosure'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'enclosure' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['enclosure'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('multiple' => true, 'fieldType' => 'checkbox', 'filesOnly' => true, 'isDownloads' => true, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'enclosure', '1'), 'extensions' => \Config::get('allowedDownload'), 'fmEditable' => true, 'fmGroup' => 'enclosure'), 'sql' => "blob NULL"), 'addImage' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['addImage'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'addImage')), 'sql' => "char(1) NOT NULL default ''"), 'singleSRC' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['singleSRC'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'singleSRC', '1'), 'extensions' => \Config::get('validImageTypes'), 'fmEditable' => true, 'fmGroup' => 'image'), 'sql' => "binary(16) NULL"), 'alt' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['alt'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'alt'), 'tl_class' => 'w50', 'fmEditable' => true, 'fmGroup' => 'image'), 'sql' => "varchar(255) NOT NULL default ''"), 'imgTitle' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['imgTitle'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'imgTitle'), 'tl_class' => 'w50', 'fmEditable' => true, 'fmGroup' => 'image'), 'sql' => "varchar(255) NOT NULL default ''"), 'floating' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['floating'], 'default' => 'above', 'exclude' => true, 'inputType' => 'radioTable', 'options' => array('above', 'left', 'right', 'below'), 'eval' => array('cols' => 4, 'tl_class' => 'w50'), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'sql' => "varchar(32) NOT NULL default ''"), 'size' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['size'], 'exclude' => true, 'inputType' => 'imageSize', 'options' => System::getImageSizes(), 'reference' => &$GLOBALS['TL_LANG']['MSC'], 'eval' => array('rgxp' => 'natural', 'includeBlankOption' => true, 'nospace' => true, 'helpwizard' => true, 'tl_class' => 'w50', 'fmEditable' => true, 'fmGroup' => 'image'), 'sql' => "varchar(64) NOT NULL default ''"), 'fullsize' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['fullsize'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50 m12', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'fullsize'), 'fmEditable' => true, 'fmGroup' => 'image'), 'sql' => "char(1) NOT NULL default ''"), 'caption' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['caption'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'allowHtml' => true, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'caption'), 'tl_class' => 'w50', 'fmEditable' => true, 'fmGroup' => 'image'), 'sql' => "varchar(255) NOT NULL default ''"), 'geo_latitude' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['geo_latitude'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 128, 'tl_class' => 'w50', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'geo_latitude'), 'fmEditable' => true, 'fmGroup' => 'map'), 'sql' => "varchar(128) NOT NULL default ''"), 'geo_longitude' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['geo_longitude'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 128, 'tl_class' => 'w50', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'geo_longitude'), 'fmEditable' => true, 'fmGroup' => 'map'), 'sql' => "varchar(128) NOT NULL default ''"), 'geo_address' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['geo_address'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'long', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'geo_address'), 'fmEditable' => true, 'fmGroup' => 'map'), 'sql' => "varchar(255) NOT NULL default ''"), 'addMarker' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['addMarker'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'markerSRC' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['markerSRC'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('filesOnly' => true, 'fieldType' => 'radio', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'markerSRC'), 'extensions' => \Config::get('validImageTypes'), 'fmEditable' => true, 'fmGroup' => 'map'), 'sql' => "binary(16) NULL"), 'markerAlt' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['markerAlt'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'tl_class' => 'w50', 'mandatory' => $this->setCustomMandatory($arrMandatory, 'markerAlt'), 'fmEditable' => true, 'fmGroup' => 'map'), 'sql' => "varchar(255) NOT NULL default ''"), 'markerCaption' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['markerCaption'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('maxlength' => 255, 'allowHtml' => true, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'markerCaption'), 'tl_class' => 'w50', 'fmEditable' => true, 'fmGroup' => 'map'), 'sql' => "varchar(255) NOT NULL default ''"), 'protected' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['protected'], 'inputType' => 'checkbox', 'exclude' => true, 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'groups' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['groups'], 'inputType' => 'checkbox', 'exclude' => true, 'foreignKey' => 'tl_member_group.name', 'eval' => array('mandatory' => true, 'multiple' => true), 'sql' => "blob NULL", 'relation' => array('type' => 'hasMany', 'load' => 'lazy')), 'guests' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['guests'], 'filter' => true, 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''"), 'cssID' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['cssID'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('multiple' => true, 'size' => 2, 'tl_class' => 'w50 clr', 'fmEditable' => true, 'fmGroup' => 'expert'), 'sql' => "varchar(255) NOT NULL default ''"), 'published' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['published'], 'inputType' => 'checkbox', 'filter' => true, 'exclude' => true, 'eval' => array('submitOnChange' => true, 'doNotCopy' => true, 'fmEditable' => true, 'fmGroup' => 'expert'), 'sql' => "char(1) NOT NULL default ''"), 'start' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['start'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('rgxp' => 'datim', 'datepicker' => true, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'start'), 'tl_class' => 'w50 wizard', 'fmEditable' => true, 'fmGroup' => 'expert'), 'sql' => "varchar(10) NOT NULL default ''"), 'stop' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['stop'], 'inputType' => 'text', 'exclude' => true, 'eval' => array('rgxp' => 'datim', 'datepicker' => true, 'mandatory' => $this->setCustomMandatory($arrMandatory, 'stop'), 'tl_class' => 'w50 wizard', 'fmEditable' => true, 'fmGroup' => 'expert'), 'sql' => "varchar(10) NOT NULL default ''"), 'mainLanguage' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['mainLanguage'], 'exclude' => false, 'inputType' => 'select', 'options_callback' => array('DCAModuleData', 'getFallbackData'), 'eval' => array('includeBlankOption' => true, 'chosen' => true, 'blankOptionLabel' => '-', 'tl_class' => 'w50'), 'sql' => "varchar(255) NOT NULL default ''"), 'addGallery' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['addGallery'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('submitOnChange' => true), 'sql' => "char(1) NOT NULL default ''"), 'orderSRC' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['orderSRC'], 'sql' => "blob NULL"), 'multiSRC' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['multiSRC'], 'exclude' => true, 'inputType' => 'fileTree', 'eval' => array('multiple' => true, 'fieldType' => 'checkbox', 'orderField' => 'orderSRC', 'files' => true, 'mandatory' => true), 'sql' => "blob NULL", 'load_callback' => array(array('DCAModuleData', 'setMultiSrcFlags'))), 'sortBy' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['sortBy'], 'exclude' => true, 'inputType' => 'select', 'options' => array('custom', 'name_asc', 'name_desc', 'date_asc', 'date_desc', 'random'), 'reference' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack'], 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(32) NOT NULL default ''"), 'metaIgnore' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['metaIgnore'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('tl_class' => 'w50 m12'), 'sql' => "char(1) NOT NULL default ''"), 'perRow' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['perRow'], 'default' => 4, 'exclude' => true, 'inputType' => 'select', 'options' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 'eval' => array('tl_class' => 'w50'), 'sql' => "smallint(5) unsigned NOT NULL default '0'"), 'perPageGallery' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['perPageGallery'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'natural', 'tl_class' => 'w50'), 'sql' => "smallint(5) unsigned NOT NULL default '0'"), 'numberOfItems' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['numberOfItems'], 'exclude' => true, 'inputType' => 'text', 'eval' => array('rgxp' => 'natural', 'tl_class' => 'w50'), 'sql' => "smallint(5) unsigned NOT NULL default '0'"), 'galleryTpl' => array('label' => &$GLOBALS['TL_LANG']['tl_fmodules_language_pack']['galleryTpl'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('DCAModuleData', 'getGalleryTemplates'), 'eval' => array('tl_class' => 'w50'), 'sql' => "varchar(64) NOT NULL default ''"));
     // add pid
     if ($this->parent) {
         $fields['pid'] = array('foreignKey' => $this->parent . '.id', 'sql' => "int(10) unsigned NOT NULL default '0'", 'relation' => array('type' => 'belongsTo', 'load' => 'eager'));
     }
     return $fields;
 }