RegistrantStorageSchema.php in RNG - Events and Registrations 8
File
src/RegistrantStorageSchema.php
View source
<?php
namespace Drupal\rng;
use Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
class RegistrantStorageSchema extends SqlContentEntityStorageSchema {
protected function getSharedTableFieldSchema(FieldStorageDefinitionInterface $storage_definition, $table_name, array $column_mapping) {
$schema = parent::getSharedTableFieldSchema($storage_definition, $table_name, $column_mapping);
if ($storage_definition
->getName() == 'type') {
$schema['fields']['type']['initial'] = 'registrant';
}
return $schema;
}
}