public function SerialSQLStorage::createStorageNameFromField in Serial Field 8
Creates the assistant storage name for a specific field.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition: Field definition.
\Drupal\Core\Entity\FieldableEntityInterface $entity: Entity.
Return value
string Storage name.
Overrides SerialStorageInterface::createStorageNameFromField
3 calls to SerialSQLStorage::createStorageNameFromField()
- SerialSQLStorage::createStorage in src/
SerialSQLStorage.php - Creates an assistant serial storage for a new created field.
- SerialSQLStorage::dropStorage in src/
SerialSQLStorage.php - Drops an assistant serial storage for a deleted field.
- SerialSQLStorage::generateValue in src/
SerialSQLStorage.php - Generates a unique serial value (unique per entity bundle).
File
- src/
SerialSQLStorage.php, line 47
Class
- SerialSQLStorage
- Serial storage service definition.
Namespace
Drupal\serialCode
public function createStorageNameFromField(FieldDefinitionInterface $fieldDefinition, FieldableEntityInterface $entity) {
return $this
->createStorageName($entity
->getEntityTypeId(), $entity
->bundle(), $fieldDefinition
->getName());
}