You are here

trait PluginDeriverDefinitionTrait in Plugin 8.2

Implements \Drupal\plugin\PluginDefinition\PluginDeriverDefinitionInterface.

Hierarchy

1 file declares its use of PluginDeriverDefinitionTrait
PluginDeriverDefinitionTraitTest.php in tests/src/Unit/PluginDefinition/PluginDeriverDefinitionTraitTest.php

File

src/PluginDefinition/PluginDeriverDefinitionTrait.php, line 10

Namespace

Drupal\plugin\PluginDefinition
View source
trait PluginDeriverDefinitionTrait {

  /**
   * The deriver class.
   *
   * @var string
   *   The fully qualified name of a class that implements
   *   \Drupal\Component\Plugin\Derivative\DeriverInterface.
   */
  protected $deriverClass;

  /**
   * Implements \Drupal\plugin\PluginDefinition\PluginDeriverDefinitionInterface::setDeriverClass().
   */
  public function setDeriverClass($class) {
    PluginDefinitionValidator::validateClass($class);
    $this->deriverClass = $class;
    return $this;
  }

  /**
   * Implements \Drupal\plugin\PluginDefinition\PluginDeriverDefinitionInterface::getDeriverClass().
   */
  public function getDeriverClass() {
    return $this->deriverClass;
  }

}

Members