You are here

public function SerialStorageInterface::generateValue in Serial Field 8

Generates a unique serial value (unique per entity bundle).

Parameters

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

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

bool $delete: Indicates if temporary records should be deleted.

Return value

int Unique serial id.

1 method overrides SerialStorageInterface::generateValue()
SerialSQLStorage::generateValue in src/SerialSQLStorage.php
Generates a unique serial value (unique per entity bundle).

File

src/SerialStorageInterface.php, line 70

Class

SerialStorageInterface
Defines an interface for serial storage classes.

Namespace

Drupal\serial

Code

public function generateValue(FieldDefinitionInterface $fieldDefinition, FieldableEntityInterface $entity, $delete = TRUE);