abstract class PluginDefinition in Plugin 8.2
Provides a plugin definition.
Hierarchy
- class \Drupal\plugin\PluginDefinition\PluginDefinition implements PluginDefinitionInterface uses MergeablePluginDefinitionTrait
Expanded class hierarchy of PluginDefinition
1 file declares its use of PluginDefinition
- PluginDefinitionTest.php in tests/
src/ Unit/ PluginDefinition/ PluginDefinitionTest.php
File
- src/
PluginDefinition/ PluginDefinition.php, line 10
Namespace
Drupal\plugin\PluginDefinitionView source
abstract class PluginDefinition implements PluginDefinitionInterface {
use MergeablePluginDefinitionTrait;
/**
* The plugin ID.
*
* @var string
*/
protected $id;
/**
* The class.
*
* @var string
* A fully qualified class name.
*/
protected $class;
/**
* The plugin provider.
*
* @var string|null
*/
protected $provider;
/**
* {@inheritdoc}
*/
public function setId($id) {
$this->id = $id;
return $this;
}
/**
* {@inheritdoc}
*/
public function getId() {
return $this->id;
}
/**
* {@inheritdoc}
*/
public function setClass($class) {
PluginDefinitionValidator::validateClass($class);
$this->class = $class;
return $this;
}
/**
* {@inheritdoc}
*/
public function getClass() {
return $this->class;
}
/**
* {@inheritdoc}
*/
public function setProvider($provider) {
$this->provider = $provider;
return $this;
}
/**
* {@inheritdoc}
*/
public function getProvider() {
return $this->provider;
}
}