function StaticDiscovery::setDefinition
Same name in other branches
- 8.9.x core/lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php \Drupal\Component\Plugin\Discovery\StaticDiscovery::setDefinition()
- 10 core/lib/Drupal/Component/Plugin/Discovery/StaticDiscovery.php \Drupal\Component\Plugin\Discovery\StaticDiscovery::setDefinition()
- 11.x 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 25
Class
- StaticDiscovery
- Allows plugin definitions to be manually registered.
Namespace
Drupal\Component\Plugin\DiscoveryCode
public function setDefinition($plugin, $definition) {
$this->definitions[$plugin] = $definition;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.