function InfoHookDecorator::getDefinitions
Same name in other branches
- 9 core/lib/Drupal/Core/Plugin/Discovery/InfoHookDecorator.php \Drupal\Core\Plugin\Discovery\InfoHookDecorator::getDefinitions()
- 10 core/lib/Drupal/Core/Plugin/Discovery/InfoHookDecorator.php \Drupal\Core\Plugin\Discovery\InfoHookDecorator::getDefinitions()
- 11.x core/lib/Drupal/Core/Plugin/Discovery/InfoHookDecorator.php \Drupal\Core\Plugin\Discovery\InfoHookDecorator::getDefinitions()
Overrides DiscoveryTrait::getDefinitions
File
-
core/
lib/ Drupal/ Core/ Plugin/ Discovery/ InfoHookDecorator.php, line 45
Class
- InfoHookDecorator
- Allows info hook implementations to enhance discovered plugin definitions.
Namespace
Drupal\Core\Plugin\DiscoveryCode
public function getDefinitions() {
$definitions = $this->decorated
->getDefinitions();
foreach (\Drupal::moduleHandler()->getImplementations($this->hook) as $module) {
$function = $module . '_' . $this->hook;
$function($definitions);
}
return $definitions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.