function EntityFieldManager::useCaches

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::useCaches()
  2. 10 core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::useCaches()
  3. 11.x core/lib/Drupal/Core/Entity/EntityFieldManager.php \Drupal\Core\Entity\EntityFieldManager::useCaches()

Overrides EntityFieldManagerInterface::useCaches

File

core/lib/Drupal/Core/Entity/EntityFieldManager.php, line 614

Class

EntityFieldManager
Manages the discovery of entity fields.

Namespace

Drupal\Core\Entity

Code

public function useCaches($use_caches = FALSE) {
    $this->useCaches = $use_caches;
    if (!$use_caches) {
        $this->fieldDefinitions = [];
        $this->baseFieldDefinitions = [];
        $this->fieldStorageDefinitions = [];
        $this->activeFieldStorageDefinitions = [];
    }
}

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