class Plugin
Same name in this branch
- 11.x composer/Plugin/Scaffold/Plugin.php \Drupal\Composer\Plugin\Scaffold\Plugin
- 11.x core/lib/Drupal/Component/Annotation/Plugin.php \Drupal\Component\Annotation\Plugin
Same name in other branches
- 9 composer/Plugin/Scaffold/Plugin.php \Drupal\Composer\Plugin\Scaffold\Plugin
- 9 core/lib/Drupal/Component/Annotation/Plugin.php \Drupal\Component\Annotation\Plugin
- 8.9.x composer/Plugin/Scaffold/Plugin.php \Drupal\Composer\Plugin\Scaffold\Plugin
- 8.9.x core/lib/Drupal/Component/Annotation/Plugin.php \Drupal\Component\Annotation\Plugin
- 10 composer/Plugin/Scaffold/Plugin.php \Drupal\Composer\Plugin\Scaffold\Plugin
- 10 core/lib/Drupal/Component/Annotation/Plugin.php \Drupal\Component\Annotation\Plugin
- 10 core/lib/Drupal/Component/Plugin/Attribute/Plugin.php \Drupal\Component\Plugin\Attribute\Plugin
Defines a Plugin attribute object.
Attributes in plugin classes can use this class in order to pass various metadata about the plugin through the parser to DiscoveryInterface::getDefinitions() calls.
Hierarchy
- class \Drupal\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
- class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
Expanded class hierarchy of Plugin
Related topics
59 files declare their use of Plugin
- Action.php in core/
lib/ Drupal/ Core/ Action/ Attribute/ Action.php - Archiver.php in core/
lib/ Drupal/ Core/ Archiver/ Attribute/ Archiver.php - AttributeBridgeDecoratorTest.php in core/
tests/ Drupal/ Tests/ Component/ Plugin/ Discovery/ AttributeBridgeDecoratorTest.php - AttributeClassDiscovery.php in core/
lib/ Drupal/ Component/ Plugin/ Discovery/ AttributeClassDiscovery.php - AttributeDiscoveryTest1.php in core/
tests/ fixtures/ plugins/ Plugin/ PluginNamespace/ AttributeDiscoveryTest1.php
23 string references to 'Plugin'
- Action::create in core/
modules/ system/ src/ Entity/ Action.php - Constructs a new entity object, without permanently saving it.
- ActionFormBase::form in core/
modules/ action/ src/ Form/ ActionFormBase.php - Gets the actual form array to be built.
- ActionValidationTest::testInvalidPluginId in core/
modules/ system/ tests/ src/ Kernel/ Entity/ ActionValidationTest.php - Tests that the action plugin ID is validated.
- block.schema.yml in core/
modules/ block/ config/ schema/ block.schema.yml - core/modules/block/config/schema/block.schema.yml
- BlockCreationTrait::placeBlock in core/
modules/ block/ tests/ src/ Traits/ BlockCreationTrait.php - Creates a block instance based on default settings.
File
-
core/
lib/ Drupal/ Component/ Plugin/ Attribute/ Plugin.php, line 14
Namespace
Drupal\Component\Plugin\AttributeView source
class Plugin extends AttributeBase {
/**
* Constructs a plugin attribute object.
*
* @param string $id
* The plugin ID.
* @param class-string|null $deriver
* (optional) The deriver class.
*/
public function __construct(string $id, ?string $deriver = NULL) {
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
AttributeBase::$class | protected | property | The class used for this attribute class. | ||
AttributeBase::$provider | protected | property | The provider of the attribute class. | ||
AttributeBase::get | public | function | Gets the value of an attribute. | Overrides AttributeInterface::get | 7 |
AttributeBase::getClass | public | function | Gets the class of the attribute class. | Overrides AttributeInterface::getClass | 1 |
AttributeBase::getId | public | function | Gets the unique ID for this attribute class. | Overrides AttributeInterface::getId | |
AttributeBase::getProvider | public | function | Gets the name of the provider of the attribute class. | Overrides AttributeInterface::getProvider | |
AttributeBase::setClass | public | function | Sets the class of the attributed class. | Overrides AttributeInterface::setClass | 1 |
AttributeBase::setProvider | public | function | Sets the name of the provider of the attribute class. | Overrides AttributeInterface::setProvider | |
Plugin::__construct | public | function | Constructs a plugin attribute object. | Overrides AttributeBase::__construct | 50 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.