You are here

public function StaticDiscovery::getDefinitions in Plug 7

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

1 call to StaticDiscovery::getDefinitions()
StaticDiscoveryDecorator::getDefinitions in lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php
Gets the definition of all plugins for this type.
1 method overrides StaticDiscovery::getDefinitions()
StaticDiscoveryDecorator::getDefinitions in lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php
Gets the definition of all plugins for this type.

File

lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php, line 21
Contains \Drupal\Component\Plugin\Discovery\StaticDiscovery.

Class

StaticDiscovery
A discovery mechanism that allows plugin definitions to be manually registered rather than actively discovered.

Namespace

Drupal\Component\Plugin\Discovery

Code

public function getDefinitions() {
  if (!$this->definitions) {
    $this->definitions = array();
  }
  return $this->definitions;
}