You are here

trait PluginCategoryDefinitionTrait in Plugin 8.2

Implements \Drupal\plugin\PluginDefinition\PluginCategoryDefinitionInterface.

Hierarchy

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\PluginDefinition
View 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