public static function CalendarEvent::storageFieldDefinitions in Opigno calendar event 8
Same name and namespace in other branches
- 3.x src/Entity/CalendarEvent.php \Drupal\opigno_calendar_event\Entity\CalendarEvent::storageFieldDefinitions()
Provides storage field definitions for this entity type.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
Return value
\Drupal\Core\Field\FieldStorageDefinitionInterface[] An array of field storage definitions.
2 calls to CalendarEvent::storageFieldDefinitions()
File
- src/
Entity/ CalendarEvent.php, line 296
Class
- CalendarEvent
- Defines the "Calendar event" entity class.
Namespace
Drupal\opigno_calendar_event\EntityCode
public static function storageFieldDefinitions(EntityTypeInterface $entity_type) {
$storage_definitions = [];
// Retrieve storage definitions for our date fields.
$entity_type_id = $entity_type
->id();
/** @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface $bundle_info */
$bundle_info = \Drupal::service('entity_type.bundle.info');
foreach ($bundle_info
->getBundleInfo($entity_type_id) as $bundle => $info) {
$storage_definitions += static::bundleFieldDefinitions($entity_type, $bundle, []);
}
return $storage_definitions;
}