You are here

public function PluginDiscoveryDecorator::getDefinitions in Plugin 8.2

Gets the definition of all plugins for this type.

Return value

mixed[] An array of plugin definitions (empty array if no definitions were found). Keys are plugin IDs.

Overrides DiscoveryTrait::getDefinitions

See also

\Drupal\Core\Plugin\FilteredPluginManagerInterface::getFilteredDefinitions()

File

src/PluginDiscovery/PluginDiscoveryDecorator.php, line 56

Class

PluginDiscoveryDecorator
Decorates plugin discovery.

Namespace

Drupal\plugin\PluginDiscovery

Code

public function getDefinitions() {
  if (is_null($this->pluginDefinitions) || !$this->useCaches) {
    $this->pluginDefinitions = $this
      ->processDecoratedDefinitions($this->decoratedDiscovery
      ->getDefinitions());
  }
  return $this->pluginDefinitions;
}