class FieldFormatterThirdPartySettingsFormEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/field_event_dispatcher/src/Event/Field/FieldFormatterThirdPartySettingsFormEvent.php \Drupal\field_event_dispatcher\Event\Field\FieldFormatterThirdPartySettingsFormEvent
Class FieldFormatterThirdPartySettingsFormEvent.
Hierarchy
- class \Drupal\field_event_dispatcher\Event\Field\AbstractFieldThirdPartySettingsFormEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
- class \Drupal\field_event_dispatcher\Event\Field\FieldFormatterThirdPartySettingsFormEvent
Expanded class hierarchy of FieldFormatterThirdPartySettingsFormEvent
2 files declare their use of FieldFormatterThirdPartySettingsFormEvent
- FieldFormatterThirdPartySettingsFormEventTest.php in modules/
field_event_dispatcher/ tests/ src/ Unit/ Field/ FieldFormatterThirdPartySettingsFormEventTest.php - field_event_dispatcher.module in modules/
field_event_dispatcher/ field_event_dispatcher.module - Field event dispatcher submodule.
File
- modules/
field_event_dispatcher/ src/ Event/ Field/ FieldFormatterThirdPartySettingsFormEvent.php, line 13
Namespace
Drupal\field_event_dispatcher\Event\FieldView source
class FieldFormatterThirdPartySettingsFormEvent extends AbstractFieldThirdPartySettingsFormEvent {
/**
* The instantiated field formatter plugin.
*
* @var \Drupal\Core\Field\FormatterInterface
*/
private $plugin;
/**
* The entity view mode.
*
* @var string
*/
private $viewMode;
/**
* FieldFormatterThirdPartySettingsFormEvent constructor.
*
* @param \Drupal\Core\Field\FormatterInterface $plugin
* The instantiated field formatter plugin.
* @param \Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition
* The field definition.
* @param string $viewMode
* The entity view mode.
* @param array $form
* The (entire) configuration form array.
* @param \Drupal\Core\Form\FormStateInterface $formState
* The form state.
*/
public function __construct(FormatterInterface $plugin, FieldDefinitionInterface $fieldDefinition, string $viewMode, array $form, FormStateInterface $formState) {
$this->plugin = $plugin;
$this->fieldDefinition = $fieldDefinition;
$this->viewMode = $viewMode;
$this->form = $form;
$this->formState = $formState;
}
/**
* Get the instantiated field formatter plugin.
*
* @return \Drupal\Core\Field\FormatterInterface
* A field formatter plugin.
*/
public function getPlugin() : FormatterInterface {
return $this->plugin;
}
/**
* Get the entity view mode.
*
* @return string
* The current view mode.
*/
public function getViewMode() : string {
return $this->viewMode;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::FIELD_FORMATTER_THIRD_PARTY_SETTINGS_FORM;
}
}