You are here

public function DiscoveryCachedTrait::getDefinition in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Component/Plugin/Discovery/DiscoveryCachedTrait.php \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait::getDefinition()

Overrides DiscoveryTrait::getDefinition

19 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.
FieldTypePluginManager::getPluginClass in core/lib/Drupal/Core/Field/FieldTypePluginManager.php
@inheritdoc

... See full list

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 24
Contains \Drupal\Component\Plugin\Discovery\DiscoveryCachedTrait.

Class

DiscoveryCachedTrait

Namespace

Drupal\Component\Plugin\Discovery

Code

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);
}