class PluginDefinition in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Component/Plugin/Definition/PluginDefinition.php \Drupal\Component\Plugin\Definition\PluginDefinition
Provides object-based plugin definitions.
Hierarchy
- class \Drupal\Component\Plugin\Definition\PluginDefinition implements PluginDefinitionInterface
Expanded class hierarchy of PluginDefinition
8 files declare their use of PluginDefinition
- AnnotationBridgeDecoratorTest.php in core/
tests/ Drupal/ Tests/ Component/ Annotation/ Plugin/ Discovery/ AnnotationBridgeDecoratorTest.php - ContextAwarePluginBaseTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ Context/ ContextAwarePluginBaseTest.php - ContextAwarePluginTraitTest.php in core/
tests/ Drupal/ KernelTests/ Core/ Plugin/ Context/ ContextAwarePluginTraitTest.php - ContextHandlerTest.php in core/
tests/ Drupal/ Tests/ Core/ Plugin/ ContextHandlerTest.php - Contains \Drupal\Tests\Core\Plugin\ContextHandlerTest.
- DefaultPluginManagerTest.php in core/
tests/ Drupal/ Tests/ Core/ Plugin/ DefaultPluginManagerTest.php
File
- core/
lib/ Drupal/ Component/ Plugin/ Definition/ PluginDefinition.php, line 8
Namespace
Drupal\Component\Plugin\DefinitionView source
class PluginDefinition implements PluginDefinitionInterface {
/**
* The plugin ID.
*
* @var string
*/
protected $id;
/**
* A fully qualified class name.
*
* @var string
*/
protected $class;
/**
* The plugin provider.
*
* @var string
*/
protected $provider;
/**
* {@inheritdoc}
*/
public function id() {
return $this->id;
}
/**
* {@inheritdoc}
*/
public function setClass($class) {
$this->class = $class;
return $this;
}
/**
* {@inheritdoc}
*/
public function getClass() {
return $this->class;
}
/**
* {@inheritdoc}
*/
public function getProvider() {
return $this->provider;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginDefinition:: |
protected | property | A fully qualified class name. | |
PluginDefinition:: |
protected | property | The plugin ID. | 1 |
PluginDefinition:: |
protected | property | The plugin provider. | |
PluginDefinition:: |
public | function |
Gets the class. Overrides PluginDefinitionInterface:: |
|
PluginDefinition:: |
public | function |
Gets the plugin provider. Overrides PluginDefinitionInterface:: |
|
PluginDefinition:: |
public | function |
Gets the unique identifier of the plugin. Overrides PluginDefinitionInterface:: |
1 |
PluginDefinition:: |
public | function |
Sets the class. Overrides PluginDefinitionInterface:: |
1 |