You are here

public function EntityManagerWrapper::clearCachedDefinitions in Devel 4.x

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Entity/EntityManagerWrapper.php \Drupal\webprofiler\Entity\EntityManagerWrapper::clearCachedDefinitions()
  2. 8 webprofiler/src/Entity/EntityManagerWrapper.php \Drupal\webprofiler\Entity\EntityManagerWrapper::clearCachedDefinitions()
  3. 8.2 webprofiler/src/Entity/EntityManagerWrapper.php \Drupal\webprofiler\Entity\EntityManagerWrapper::clearCachedDefinitions()

Clears static and persistent plugin definition caches.

Don't resort to calling \Drupal::cache()->delete() and friends to make Drupal detect new or updated plugin definitions. Always use this method on the appropriate plugin type's plugin manager!

Overrides DefaultPluginManager::clearCachedDefinitions

File

webprofiler/src/Entity/EntityManagerWrapper.php, line 160

Class

EntityManagerWrapper
Class EntityManagerWrapper.

Namespace

Drupal\webprofiler\Entity

Code

public function clearCachedDefinitions() {
  $this->entityTypeManager
    ->clearCachedDefinitions();
  $this->loaded = NULL;
  $this->rendered = NULL;
}