Files
farmOS-dev/web/core/tests/fixtures/plugins/CustomPlugin.php
2024-12-10 15:08:16 +01:00

35 lines
620 B
PHP

<?php
declare(strict_types=1);
namespace com\example\PluginNamespace;
use Drupal\Component\Plugin\Attribute\Plugin;
/**
* Custom plugin attribute.
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class CustomPlugin extends Plugin {
/**
* Constructs a CustomPlugin attribute object.
*
* @param string $id
* The attribute class ID.
* @param string $title
* The title.
*/
public function __construct(
public readonly string $id,
public readonly string $title,
) {}
}
/**
* Custom plugin attribute.
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class CustomPlugin2 extends Plugin {}