
| Current Path : /var/www/html/stolberg/web/core/lib/Drupal/Component/Plugin/Attribute/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/stolberg/web/core/lib/Drupal/Component/Plugin/Attribute/Plugin.php |
<?php
namespace Drupal\Component\Plugin\Attribute;
/**
* 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.
*
* @ingroup plugin_api
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
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(
public readonly string $id,
public readonly ?string $deriver = NULL,
) {}
}