EntityDefinitionUpdateManager::doFieldUpdate

protected EntityDefinitionUpdateManager::doFieldUpdate($op, $storage_definition = NULL, $original_storage_definition = NULL)

Performs a field storage definition update.

Parameters

string $op: The operation to perform, possible values are static::DEFINITION_CREATED, static::DEFINITION_UPDATED or static::DEFINITION_DELETED.

array|null $storage_definition: The new field storage definition.

array|null $original_storage_definition: The original field storage definition.

File

core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php, line 231

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

protected function doFieldUpdate($op, $storage_definition = NULL, $original_storage_definition = NULL) {
  switch ($op) {
    case static::DEFINITION_CREATED:
      $this->entityManager->onFieldStorageDefinitionCreate($storage_definition);
      break;

    case static::DEFINITION_UPDATED:
      $this->entityManager->onFieldStorageDefinitionUpdate($storage_definition, $original_storage_definition);
      break;

    case static::DEFINITION_DELETED:
      $this->entityManager->onFieldStorageDefinitionDelete($original_storage_definition);
      break;
  }
}
doc_Drupal
2016-10-29 09:04:59
Comments
Leave a Comment

Please login to continue.