class EntityBaseFieldInfoEvent in Hook Event Dispatcher 8
Class EntityBaseFieldInfoEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\EntityType\EntityBaseFieldInfoEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of EntityBaseFieldInfoEvent
2 files declare their use of EntityBaseFieldInfoEvent
- EntityTypeBaseFieldTest.php in tests/
src/ Unit/ EntityType/ EntityTypeBaseFieldTest.php - hook_event_dispatcher.module in ./
hook_event_dispatcher.module - Hook event dispatcher module.
File
- src/
Event/ EntityType/ EntityBaseFieldInfoEvent.php, line 13
Namespace
Drupal\hook_event_dispatcher\Event\EntityTypeView source
class EntityBaseFieldInfoEvent extends Event implements EventInterface {
/**
* The entity type.
*
* @var \Drupal\Core\Entity\EntityTypeInterface
*/
private $entityType;
/**
* The fields.
*
* @var static[]
*/
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() {
return HookEventDispatcherInterface::ENTITY_BASE_FIELD_INFO;
}
/**
* Get the entity type.
*
* @return \Drupal\Core\Entity\EntityTypeInterface
* The entity type.
*/
public function getEntityType() {
return $this->entityType;
}
/**
* Get the fields.
*
* @return static[]
* The fields.
*/
public function getFields() {
return $this->fields;
}
/**
* Set the fields.
*
* @param static[] $fields
* The fields.
*/
public function setFields(array $fields) {
$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. |