public function EntityDefinitionUpdateManager::getFieldStorageDefinition in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::getFieldStorageDefinition()
Returns a field storage definition ready to be manipulated.
When needing to apply updates to existing field storage definitions, this method should always be used to retrieve a storage definition ready to be manipulated.
@todo Make this return a mutable storage definition interface when we have one. See https://www.drupal.org/node/2346329.
Parameters
string $name: The field name.
string $entity_type_id: The entity type identifier.
Return value
\Drupal\Core\Field\FieldStorageDefinitionInterface The field storage definition.
Overrides EntityDefinitionUpdateManagerInterface::getFieldStorageDefinition
1 call to EntityDefinitionUpdateManager::getFieldStorageDefinition()
- EntityDefinitionUpdateManager::updateFieldStorageDefinition in core/
lib/ Drupal/ Core/ Entity/ EntityDefinitionUpdateManager.php - Applies any change performed to the passed field storage definition.
File
- core/
lib/ Drupal/ Core/ Entity/ EntityDefinitionUpdateManager.php, line 181 - Contains \Drupal\Core\Entity\EntityDefinitionUpdateManager.
Class
- EntityDefinitionUpdateManager
- Manages entity definition updates.
Namespace
Drupal\Core\EntityCode
public function getFieldStorageDefinition($name, $entity_type_id) {
$storage_definitions = $this->entityManager
->getLastInstalledFieldStorageDefinitions($entity_type_id);
return isset($storage_definitions[$name]) ? clone $storage_definitions[$name] : NULL;
}