protected SqlContentEntityStorageSchema::createDedicatedTableSchema(FieldStorageDefinitionInterface $storage_definition)
Creates the schema for a field stored in a dedicated table.
\Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The storage definition of the field being created.
protected function createDedicatedTableSchema(FieldStorageDefinitionInterface $storage_definition) { $schema = $this->getDedicatedTableSchema($storage_definition); foreach ($schema as $name => $table) { // Check if the table exists because it might already have been // created as part of the earlier entity type update event. if (!$this->database->schema()->tableExists($name)) { $this->database->schema()->createTable($name, $table); } } $this->saveFieldSchemaData($storage_definition, $schema); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Sql!SqlContentEntityStorageSchema.php/function/SqlContentEntityStorageSchema::createDedicatedTableSchema/8.1.x