Fichier
-
src/
Plugin/ Field/ FieldFormatter/ ColorFieldTextFormatter.php, line 40
Classe
- ColorFieldTextFormatter
- Plugin implementation of the 'color_field_swatch' formatter.
Namespace
Drupal\color_field\Plugin\Field\FieldFormatterCode
public function settingsForm(array $form, FormStateInterface $form_state) {
$elements['format'] = array(
'#type' => 'select',
'#title' => t('Format'),
'#options' => $this->getColorFormat(),
'#default_value' => $this->getSetting('format'),
);
return $elements;
}