public function StaticDiscovery::setDefinition in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php \Drupal\Component\Plugin\Discovery\StaticDiscovery::setDefinition()
- 9 core/lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php \Drupal\Component\Plugin\Discovery\StaticDiscovery::setDefinition()
Sets a plugin definition.
File
- core/
lib/ Drupal/ Component/ Plugin/ Discovery/ StaticDiscovery.php, line 26
Class
- StaticDiscovery
- A discovery mechanism that allows plugin definitions to be manually registered rather than actively discovered.
Namespace
Drupal\Component\Plugin\DiscoveryCode
public function setDefinition($plugin, $definition) {
$this->definitions[$plugin] = $definition;
}