2 calls to ColorFieldTextFormatter::getColorFormat()
- ColorFieldTextFormatter::settingsForm dans src/
Plugin/ Field/ FieldFormatter/ ColorFieldTextFormatter.php - ColorFieldTextFormatter::settingsSummary dans src/
Plugin/ Field/ FieldFormatter/ ColorFieldTextFormatter.php
Fichier
-
src/
Plugin/ Field/ FieldFormatter/ ColorFieldTextFormatter.php, line 52
Classe
- ColorFieldTextFormatter
- Plugin implementation of the 'color_field_swatch' formatter.
Namespace
Drupal\color_field\Plugin\Field\FieldFormatterCode
public function getColorFormat($format = NULL) {
$formats = array();
$formats['hexadecimal'] = $this->t('Hexadecimal Colors');
$formats['rgb'] = $this->t('RGB Colors');
$formats['rgba'] = $this->t('RGBA Colors');
// $formats['hsl'] = $this->t('HSL Colors');
// $formats['hsla'] = $this->t('HSLA Colors');
if ($format) {
return $formats[$format];
}
return $formats;
}