You are here

public function SerialSQLStorage::createStorage in Serial Field 8

Creates an assistant serial storage for a new created field.

Parameters

\Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition: Field definition.

\Drupal\Core\Entity\FieldableEntityInterface $entity: Entity.

Overrides SerialStorageInterface::createStorage

File

src/SerialSQLStorage.php, line 156

Class

SerialSQLStorage
Serial storage service definition.

Namespace

Drupal\serial

Code

public function createStorage(FieldDefinitionInterface $fieldDefinition, FieldableEntityInterface $entity) {
  $storageName = $this
    ->createStorageNameFromField($fieldDefinition, $entity);
  $this
    ->createStorageFromName($storageName);
}