PluginExample.php
Namespace
Drupal\plugin_test\Plugin\AttributeFile
-
core/
modules/ system/ tests/ modules/ plugin_test/ src/ Plugin/ Attribute/ PluginExample.php
View source
<?php
namespace Drupal\plugin_test\Plugin\Attribute;
use Drupal\Component\Plugin\Attribute\Plugin;
/**
* Defines a custom PluginExample attribute.
*/
class PluginExample extends Plugin {
/**
* Constructs a PluginExample attribute.
*
* @param string $id
* The plugin ID.
* @param string $custom
* Some other sample plugin metadata.
*/
public function __construct(public readonly string $id, public readonly ?string $custom = NULL) {
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| PluginExample | Defines a custom PluginExample attribute. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.