trait PluginDeriverDefinitionTrait in Plugin 8.2
Implements \Drupal\plugin\PluginDefinition\PluginDeriverDefinitionInterface.
Hierarchy
- trait \Drupal\plugin\PluginDefinition\PluginDeriverDefinitionTrait
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\PluginDefinitionView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginDeriverDefinitionTrait:: |
protected | property | The deriver class. | |
PluginDeriverDefinitionTrait:: |
public | function | Implements \Drupal\plugin\PluginDefinition\PluginDeriverDefinitionInterface::getDeriverClass(). | |
PluginDeriverDefinitionTrait:: |
public | function | Implements \Drupal\plugin\PluginDefinition\PluginDeriverDefinitionInterface::setDeriverClass(). |