function StaticDiscoveryDecorator::getDefinitions

Same name in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator::getDefinitions()
  2. 8.9.x core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator::getDefinitions()
  3. 11.x core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php \Drupal\Component\Plugin\Discovery\StaticDiscoveryDecorator::getDefinitions()

Overrides StaticDiscovery::getDefinitions

File

core/lib/Drupal/Component/Plugin/Discovery/StaticDiscoveryDecorator.php, line 52

Class

StaticDiscoveryDecorator
A decorator that allows manual registration of undiscoverable definitions.

Namespace

Drupal\Component\Plugin\Discovery

Code

public function getDefinitions() {
    if (isset($this->registerDefinitions)) {
        call_user_func($this->registerDefinitions);
    }
    $this->definitions += $this->decorated
        ->getDefinitions();
    return parent::getDefinitions();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.