trait DiscoveryCachedTrait in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait
Hierarchy
- trait \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait uses DiscoveryTrait
1 file declares its use of DiscoveryCachedTrait
- DefaultPluginManager.php in core/
lib/ Drupal/ Core/ Plugin/ DefaultPluginManager.php - Contains \Drupal\Core\Plugin\DefaultPluginManager.
File
- core/
lib/ Drupal/ Component/ Plugin/ Discovery/ DiscoveryCachedTrait.php, line 10 - Contains \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait.
Namespace
Drupal\Component\Plugin\DiscoveryView source
trait DiscoveryCachedTrait {
use DiscoveryTrait;
/**
* Cached definitions array.
*
* @var array
*/
protected $definitions;
/**
* {@inheritdoc}
*/
public function getDefinition($plugin_id, $exception_on_invalid = TRUE) {
// Fetch definitions if they're not loaded yet.
if (!isset($this->definitions)) {
$this
->getDefinitions();
}
return $this
->doGetDefinition($this->definitions, $plugin_id, $exception_on_invalid);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DiscoveryCachedTrait:: |
protected | property | Cached definitions array. | 1 |
DiscoveryCachedTrait:: |
public | function |
Overrides DiscoveryTrait:: |
3 |
DiscoveryTrait:: |
protected | function | Gets a specific plugin definition. | |
DiscoveryTrait:: |
abstract public | function | 9 | |
DiscoveryTrait:: |
public | function |