protected function DefaultDateRecurOccurrenceHandler::createOccurrenceTable in Recurring Dates Field 8
Creates an occurrence table.
Parameters
\Drupal\Core\Field\FieldStorageDefinitionInterface $fieldDefinition: The field definition.
1 call to DefaultDateRecurOccurrenceHandler::createOccurrenceTable()
- DefaultDateRecurOccurrenceHandler::onFieldCreate in src/
Plugin/ DateRecurOccurrenceHandler/ DefaultDateRecurOccurrenceHandler.php - Reacts to field creation.
File
- src/
Plugin/ DateRecurOccurrenceHandler/ DefaultDateRecurOccurrenceHandler.php, line 292
Class
- DefaultDateRecurOccurrenceHandler
- Provides the default occurrence handler.
Namespace
Drupal\date_recur\Plugin\DateRecurOccurrenceHandlerCode
protected function createOccurrenceTable(FieldStorageDefinitionInterface $fieldDefinition) {
$entity_type = $fieldDefinition
->getTargetEntityTypeId();
$field_name = $fieldDefinition
->getName();
$table_name = $this
->getOccurrenceCacheStorageTableName($fieldDefinition);
$spec = $this
->getOccurrenceTableSchema($fieldDefinition);
$spec['description'] = 'Date recur cache for ' . $entity_type . '.' . $field_name;
$schema = $this->database
->schema();
$schema
->createTable($table_name, $spec);
}