class EntityBaseFieldInfoEvent in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/core_event_dispatcher/src/Event/Entity/EntityBaseFieldInfoEvent.php \Drupal\core_event_dispatcher\Event\Entity\EntityBaseFieldInfoEvent
Class EntityBaseFieldInfoEvent.
Hierarchy
- class \Drupal\core_event_dispatcher\Event\Entity\EntityBaseFieldInfoEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of EntityBaseFieldInfoEvent
2 files declare their use of EntityBaseFieldInfoEvent
- core_event_dispatcher.module in modules/
core_event_dispatcher/ core_event_dispatcher.module - Core event dispatcher submodule.
- EntityTypeBaseFieldTest.php in modules/
core_event_dispatcher/ tests/ src/ Unit/ Entity/ EntityTypeBaseFieldTest.php
File
- modules/
core_event_dispatcher/ src/ Event/ Entity/ EntityBaseFieldInfoEvent.php, line 13
Namespace
Drupal\core_event_dispatcher\Event\EntityView source
class EntityBaseFieldInfoEvent extends Event implements EventInterface {
/**
* The entity type.
*
* @var \Drupal\Core\Entity\EntityTypeInterface
*/
private $entityType;
/**
* The fields.
*
* @var array
*/
private $fields = [];
/**
* EntityBaseFieldInfoEvent constructor.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entityType
* The entity type.
*/
public function __construct(EntityTypeInterface $entityType) {
$this->entityType = $entityType;
}
/**
* {@inheritdoc}
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::ENTITY_BASE_FIELD_INFO;
}
/**
* Get the entity type.
*
* @return \Drupal\Core\Entity\EntityTypeInterface
* The entity type.
*/
public function getEntityType() : EntityTypeInterface {
return $this->entityType;
}
/**
* Get the fields.
*
* @return array
* The fields.
*/
public function getFields() : array {
return $this->fields;
}
/**
* Set the fields.
*
* @param array $fields
* The fields.
*/
public function setFields(array $fields) : void {
$this->fields = $fields;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityBaseFieldInfoEvent:: |
private | property | The entity type. | |
EntityBaseFieldInfoEvent:: |
private | property | The fields. | |
EntityBaseFieldInfoEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
EntityBaseFieldInfoEvent:: |
public | function | Get the entity type. | |
EntityBaseFieldInfoEvent:: |
public | function | Get the fields. | |
EntityBaseFieldInfoEvent:: |
public | function | Set the fields. | |
EntityBaseFieldInfoEvent:: |
public | function | EntityBaseFieldInfoEvent constructor. |