You are here

public function ElementEntityClassTrait::settingsForm in Element Class Formatter 8

File

src/Plugin/Field/FieldFormatter/ElementEntityClassTrait.php, line 28

Class

ElementEntityClassTrait
The ElementEntityClassTrait is used for adding classes to the #item_attributes of fields that display other entities.

Namespace

Drupal\element_class_formatter\Plugin\Field\FieldFormatter

Code

public function settingsForm(array $form, FormStateInterface $form_state) {
  $elements = parent::settingsForm($form, $form_state);
  $class = $this
    ->getSetting('class');
  return $this
    ->elementClassSettingsForm($elements, $class);
}