trait PluginCategoryDefinitionTrait in Plugin 8.2
Implements \Drupal\plugin\PluginDefinition\PluginCategoryDefinitionInterface.
Hierarchy
- trait \Drupal\plugin\PluginDefinition\PluginCategoryDefinitionTrait
1 file declares its use of PluginCategoryDefinitionTrait
- PluginCategoryDefinitionTraitTest.php in tests/
src/ Unit/ PluginDefinition/ PluginCategoryDefinitionTraitTest.php
File
- src/
PluginDefinition/ PluginCategoryDefinitionTrait.php, line 10
Namespace
Drupal\plugin\PluginDefinitionView source
trait PluginCategoryDefinitionTrait {
/**
* The plugin category.
*
* @var \Drupal\Core\StringTranslation\TranslatableString|string|null
*/
protected $category;
/**
* Implements \Drupal\plugin\PluginDefinition\PluginCategoryDefinitionInterface::setCategory().
*/
public function setCategory($category) {
$this->category = $category;
return $this;
}
/**
* Implements \Drupal\plugin\PluginDefinition\PluginCategoryDefinitionInterface::getCategory().
*/
public function getCategory() {
return $this->category;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginCategoryDefinitionTrait:: |
protected | property | The plugin category. | |
PluginCategoryDefinitionTrait:: |
public | function | Implements \Drupal\plugin\PluginDefinition\PluginCategoryDefinitionInterface::getCategory(). | |
PluginCategoryDefinitionTrait:: |
public | function | Implements \Drupal\plugin\PluginDefinition\PluginCategoryDefinitionInterface::setCategory(). |