public function DateRecurOccurrences::onEntityTypeCreate in Recurring Dates Field 3.1.x
Same name and namespace in other branches
- 8.2 src/DateRecurOccurrences.php \Drupal\date_recur\DateRecurOccurrences::onEntityTypeCreate()
- 3.x src/DateRecurOccurrences.php \Drupal\date_recur\DateRecurOccurrences::onEntityTypeCreate()
- 3.0.x src/DateRecurOccurrences.php \Drupal\date_recur\DateRecurOccurrences::onEntityTypeCreate()
Reacts to the creation of the entity type.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type being created.
Overrides EntityTypeEventSubscriberTrait::onEntityTypeCreate
File
- src/
DateRecurOccurrences.php, line 231
Class
- DateRecurOccurrences
- Manages occurrences tables and the data that populates them.
Namespace
Drupal\date_recurCode
public function onEntityTypeCreate(EntityTypeInterface $entity_type) : void {
if (!$entity_type instanceof ContentEntityTypeInterface) {
// Only add field for content entity types.
return;
}
foreach ($this
->getBaseFieldStorages($entity_type) as $baseFieldStorage) {
$this
->fieldStorageCreate($baseFieldStorage);
}
}