Files
drupal11-ddev/web/core/tests/fixtures/plugins/CustomPlugin.php
2025-10-08 11:39:17 -04: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 {}