You are here

public function EntityTestDefinitionSubscriber::onFieldableEntityTypeUpdate in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php \Drupal\entity_test\EntityTestDefinitionSubscriber::onFieldableEntityTypeUpdate()
  2. 9 core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php \Drupal\entity_test\EntityTestDefinitionSubscriber::onFieldableEntityTypeUpdate()

Reacts to the update of a fieldable entity type.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The updated entity type definition.

\Drupal\Core\Entity\EntityTypeInterface $original: The original entity type definition.

\Drupal\Core\Field\FieldStorageDefinitionInterface[] $field_storage_definitions: The updated field storage definitions, including possibly new ones.

\Drupal\Core\Field\FieldStorageDefinitionInterface[] $original_field_storage_definitions: The original field storage definitions.

array &$sandbox: (optional) A sandbox array provided by a hook_update_N() implementation or a Batch API callback. If the entity schema update requires a data migration, this parameter is mandatory. Defaults to NULL.

Overrides EntityTypeEventSubscriberTrait::onFieldableEntityTypeUpdate

File

core/modules/system/tests/modules/entity_test/src/EntityTestDefinitionSubscriber.php, line 134

Class

EntityTestDefinitionSubscriber
Test entity type and field storage definition event subscriber.

Namespace

Drupal\entity_test

Code

public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original, array $field_storage_definitions, array $original_field_storage_definitions, array &$sandbox = NULL) {
  $this
    ->storeEvent(EntityTypeEvents::UPDATE);
}