class Plugin
Same name in this branch
- 11.1.x vendor/dealerdirect/phpcodesniffer-composer-installer/src/Plugin.php \PHPCSStandards\Composer\Plugin\Installers\PHPCodeSniffer\Plugin
- 11.1.x vendor/phpstan/extension-installer/src/Plugin.php \PHPStan\ExtensionInstaller\Plugin
- 11.1.x vendor/php-http/discovery/src/Composer/Plugin.php \Http\Discovery\Composer\Plugin
- 11.1.x vendor/composer/installers/src/Composer/Installers/Plugin.php \Composer\Installers\Plugin
- 11.1.x vendor/tbachert/spi/src/Composer/Plugin.php \Nevay\SPI\Composer\Plugin
- 11.1.x composer/Plugin/Scaffold/Plugin.php \Drupal\Composer\Plugin\Scaffold\Plugin
- 11.1.x core/lib/Drupal/Component/Annotation/Plugin.php \Drupal\Component\Annotation\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
- Plugin API
- Using the Plugin API
52 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 - AttributeClassDiscovery.php in core/
lib/ Drupal/ Component/ Plugin/ Discovery/ AttributeClassDiscovery.php - Block.php in core/
lib/ Drupal/ Core/ Block/ Attribute/ Block.php - CKEditor5AspectsOfCKEditor5Plugin.php in core/
modules/ ckeditor5/ src/ Attribute/ CKEditor5AspectsOfCKEditor5Plugin.php
14 string references to 'Plugin'
- Action::create in core/
modules/ system/ src/ Entity/ Action.php - Constructs a new entity object, without permanently saving it.
- block.schema.yml in core/
modules/ block/ config/ schema/ block.schema.yml - core/modules/block/config/schema/block.schema.yml
- DisplayPluginBase::calculateCacheMetadata in core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php - Calculates the display's cache metadata by inspecting each handler/plugin.
- DisplayPluginBase::getAllPlugins in core/
modules/ views/ src/ Plugin/ views/ display/ DisplayPluginBase.php - Gets all the plugins used by the display.
- EntityBlock::getEntityId in core/
modules/ block/ src/ Plugin/ migrate/ destination/ EntityBlock.php - Gets the entity ID of the row.
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 | 6 |
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 | 47 |