private function DevelEntityDefinitionUpdateManager::doFieldUpdate in Devel Entity Updates 3.x
Same name and namespace in other branches
- 8.2 src/DevelEntityDefinitionUpdateManager.php \Drupal\devel_entity_updates\DevelEntityDefinitionUpdateManager::doFieldUpdate()
- 8 src/DevelEntityDefinitionUpdateManager.php \Drupal\devel_entity_updates\DevelEntityDefinitionUpdateManager::doFieldUpdate()
- 3.0.x src/DevelEntityDefinitionUpdateManager.php \Drupal\devel_entity_updates\DevelEntityDefinitionUpdateManager::doFieldUpdate()
Performs a field storage definition update.
Parameters
string $op: The operation to perform, possible values are:
- EntityDefinitionUpdateManagerInterface::DEFINITION_CREATED
- EntityDefinitionUpdateManagerInterface::DEFINITION_UPDATED
- EntityDefinitionUpdateManagerInterface::DEFINITION_DELETED
\Drupal\Core\Field\FieldStorageDefinitionInterface|null $storage_definition: (optional) The new field storage definition. Defaults to none.
\Drupal\Core\Field\FieldStorageDefinitionInterface|null $original_storage_definition: (optional) The original field storage definition. Defaults to none.
1 call to DevelEntityDefinitionUpdateManager::doFieldUpdate()
- DevelEntityDefinitionUpdateManager::applyUpdates in src/
DevelEntityDefinitionUpdateManager.php - Applies all the detected valid changes.
File
- src/
DevelEntityDefinitionUpdateManager.php, line 191
Class
- DevelEntityDefinitionUpdateManager
- Development version of the entity definition update manager.
Namespace
Drupal\devel_entity_updatesCode
private function doFieldUpdate($op, FieldStorageDefinitionInterface $storage_definition = NULL, FieldStorageDefinitionInterface $original_storage_definition = NULL) {
switch ($op) {
case EntityDefinitionUpdateManagerInterface::DEFINITION_CREATED:
$this->fieldStorageDefinitionListener
->onFieldStorageDefinitionCreate($storage_definition);
break;
case EntityDefinitionUpdateManagerInterface::DEFINITION_UPDATED:
if ($storage_definition && $original_storage_definition) {
$this->fieldStorageDefinitionListener
->onFieldStorageDefinitionUpdate($storage_definition, $original_storage_definition);
}
break;
case EntityDefinitionUpdateManagerInterface::DEFINITION_DELETED:
if ($original_storage_definition) {
$this->fieldStorageDefinitionListener
->onFieldStorageDefinitionDelete($original_storage_definition);
}
break;
}
}