function EntityTypeListener::clearCachedDefinitions

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityTypeListener.php \Drupal\Core\Entity\EntityTypeListener::clearCachedDefinitions()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeListener.php \Drupal\Core\Entity\EntityTypeListener::clearCachedDefinitions()
  3. 10 core/lib/Drupal/Core/Entity/EntityTypeListener.php \Drupal\Core\Entity\EntityTypeListener::clearCachedDefinitions()

Clears necessary caches to apply entity/field definition updates.

5 calls to EntityTypeListener::clearCachedDefinitions()
EntityTypeListener::onEntityTypeCreate in core/lib/Drupal/Core/Entity/EntityTypeListener.php
Reacts to the creation of the entity type.
EntityTypeListener::onEntityTypeDelete in core/lib/Drupal/Core/Entity/EntityTypeListener.php
Reacts to the deletion of the entity type.
EntityTypeListener::onEntityTypeUpdate in core/lib/Drupal/Core/Entity/EntityTypeListener.php
Reacts to the update of the entity type.
EntityTypeListener::onFieldableEntityTypeCreate in core/lib/Drupal/Core/Entity/EntityTypeListener.php
Reacts to the creation of the fieldable entity type.
EntityTypeListener::onFieldableEntityTypeUpdate in core/lib/Drupal/Core/Entity/EntityTypeListener.php
Reacts to the update of a fieldable entity type.

File

core/lib/Drupal/Core/Entity/EntityTypeListener.php, line 176

Class

EntityTypeListener
Reacts to entity type CRUD on behalf of the Entity system.

Namespace

Drupal\Core\Entity

Code

protected function clearCachedDefinitions() {
    $this->entityTypeManager
        ->clearCachedDefinitions();
    $this->entityFieldManager
        ->clearCachedFieldDefinitions();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.