public function CacheDecorator::getDefinitions

Implements Drupal\Component\Plugin\Discovery\DicoveryInterface::getDefinitions().

Overrides DiscoveryInterface::getDefinitions

1 call to CacheDecorator::getDefinitions()
CacheDecorator::getDefinition in drupal/core/lib/Drupal/Core/Plugin/Discovery/CacheDecorator.php
Implements Drupal\Component\Plugin\Discovery\DicoveryInterface::getDefinition().

File

drupal/core/lib/Drupal/Core/Plugin/Discovery/CacheDecorator.php, line 75
Definition of Drupal\Core\Plugin\Discovery\CacheDecorator.

Class

CacheDecorator
Enables static and persistent caching of discovered plugin definitions.

Namespace

Drupal\Core\Plugin\Discovery

Code

public function getDefinitions() {
  $definitions = $this
    ->getCachedDefinitions();
  if (!isset($definitions)) {
    $definitions = $this->decorated
      ->getDefinitions();
    $this
      ->setCachedDefinitions($definitions);
  }
  return $definitions;
}