public function CategorizingPluginManager::getDefinitions in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php \Drupal\Tests\Core\Plugin\CategorizingPluginManager::getDefinitions()
Provides some test definitions to the trait.
Overrides DefaultPluginManager::getDefinitions
File
- core/
tests/ Drupal/ Tests/ Core/ Plugin/ CategorizingPluginManagerTraitTest.php, line 128 - Contains \Drupal\Tests\Core\Plugin\CategorizingPluginManagerTraitTest.
Class
- CategorizingPluginManager
- Class that allows testing the trait.
Namespace
Drupal\Tests\Core\PluginCode
public function getDefinitions() {
return [
'cucumber' => [
'label' => 'cucumber',
'category' => 'vegetables',
],
'apple' => [
'label' => 'apple',
'category' => 'fruits',
],
'mango' => [
'label' => 'mango',
'category' => 'fruits',
],
];
}