abstract class AbstractFieldSettingsSummaryFormEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/field_event_dispatcher/src/Event/Field/AbstractFieldSettingsSummaryFormEvent.php \Drupal\field_event_dispatcher\Event\Field\AbstractFieldSettingsSummaryFormEvent
Class AbstractFieldSettingsSummaryFormEvent.
Hierarchy
- class \Drupal\field_event_dispatcher\Event\Field\AbstractFieldSettingsSummaryFormEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of AbstractFieldSettingsSummaryFormEvent
1 file declares its use of AbstractFieldSettingsSummaryFormEvent
- AbstractFieldSettingsSummaryAlterEventTestCase.php in modules/
field_event_dispatcher/ tests/ src/ Unit/ Field/ AbstractFieldSettingsSummaryAlterEventTestCase.php
File
- modules/
field_event_dispatcher/ src/ Event/ Field/ AbstractFieldSettingsSummaryFormEvent.php, line 11
Namespace
Drupal\field_event_dispatcher\Event\FieldView source
abstract class AbstractFieldSettingsSummaryFormEvent extends Event implements EventInterface {
/**
* An array of summary messages.
*
* @var array
*/
private $summary;
/**
* An associative array containing related context for this formatter/widget.
*
* @var array
*/
private $context;
/**
* AbstractFieldSettingsSummaryFormEvent constructor.
*
* @param array &$summary
* An array of summary messages.
* @param array $context
* An associative array with the following elements:
* - field_definition: The field definition.
* If this is a field formatter, will also contain:
* - formatter: The formatter plugin.
* - view_mode: The view mode being configured.
* If this is a field widget, will also contain:
* - widget: The widget object.
* - form_mode: The form mode being configured.
*/
public function __construct(array &$summary, array $context) {
$this->summary =& $summary;
$this->context = $context;
}
/**
* Get the existing array of summary messages.
*
* @return array
* An array of summary messages.
*/
public function &getSummary() : array {
return $this->summary;
}
/**
* Get the associative array containing context for this formatter/widget.
*
* @return array
* An associative array of context for this field formatter/widget instance.
*/
public function getContext() : array {
return $this->context;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractFieldSettingsSummaryFormEvent:: |
private | property | An associative array containing related context for this formatter/widget. | |
AbstractFieldSettingsSummaryFormEvent:: |
private | property | An array of summary messages. | |
AbstractFieldSettingsSummaryFormEvent:: |
public | function | Get the associative array containing context for this formatter/widget. | |
AbstractFieldSettingsSummaryFormEvent:: |
public | function | Get the existing array of summary messages. | |
AbstractFieldSettingsSummaryFormEvent:: |
public | function | AbstractFieldSettingsSummaryFormEvent constructor. | |
EventInterface:: |
public | function | Get the dispatcher type. | 75 |