public function DiscoveryCachedTrait::getDefinition in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait::getDefinition()
Overrides DiscoveryTrait::getDefinition
18 calls to DiscoveryCachedTrait::getDefinition()
- ArchiverManager::createInstance in core/
lib/ Drupal/ Core/ Archiver/ ArchiverManager.php - Creates a pre-configured instance of a plugin.
- EntityTypeManager::getDefinition in core/
lib/ Drupal/ Core/ Entity/ EntityTypeManager.php - Gets a specific plugin definition.
- FieldTypePluginManager::getDefaultFieldSettings in core/
lib/ Drupal/ Core/ Field/ FieldTypePluginManager.php - Returns the default field-level settings for a field type.
- FieldTypePluginManager::getDefaultStorageSettings in core/
lib/ Drupal/ Core/ Field/ FieldTypePluginManager.php - Returns the default storage-level settings for a field type.
- FormatterPluginManager::createInstance in core/
lib/ Drupal/ Core/ Field/ FormatterPluginManager.php - Creates a pre-configured instance of a plugin.
3 methods override DiscoveryCachedTrait::getDefinition()
- EntityTypeManager::getDefinition in core/
lib/ Drupal/ Core/ Entity/ EntityTypeManager.php - Gets a specific plugin definition.
- StaticDiscoveryDecorator::getDefinition in core/
lib/ Drupal/ Component/ Plugin/ Discovery/ StaticDiscoveryDecorator.php - TypedConfigManager::getDefinition in core/
lib/ Drupal/ Core/ Config/ TypedConfigManager.php - Gets a specific plugin definition.
File
- core/
lib/ Drupal/ Component/ Plugin/ Discovery/ DiscoveryCachedTrait.php, line 19
Class
Namespace
Drupal\Component\Plugin\DiscoveryCode
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);
}