class CustomPlugin

Same name in this branch
  1. 11.x core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php \Drupal\Tests\Component\Annotation\CustomPlugin
  2. 11.x core/tests/Drupal/Tests/Component/Plugin/Attribute/Fixtures/CustomPlugin.php \com\example\PluginNamespace\CustomPlugin
Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php \Drupal\Tests\Component\Annotation\CustomPlugin
  2. 8.9.x core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php \Drupal\Tests\Component\Annotation\CustomPlugin
  3. 10 core/tests/Drupal/Tests/Component/Annotation/AnnotatedClassDiscoveryTest.php \Drupal\Tests\Component\Annotation\CustomPlugin
  4. 10 core/tests/Drupal/Tests/Component/Plugin/Attribute/Fixtures/CustomPlugin.php \com\example\PluginNamespace\CustomPlugin
  5. 10 core/tests/fixtures/plugins/CustomPlugin.php \com\example\PluginNamespace\CustomPlugin

Custom plugin attribute.

Attributes

#[\Attribute(\Attribute::TARGET_CLASS)]

Hierarchy

  • class \com\example\PluginNamespace\CustomPlugin implements \Drupal\Component\Plugin\Attribute\Plugin

Expanded class hierarchy of CustomPlugin

File

core/tests/fixtures/plugins/CustomPlugin.php, line 12

Namespace

com\example\PluginNamespace
View source
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) {
  }

}

Members

Title Sort descending Modifiers Object type Summary
CustomPlugin::__construct public function Constructs a CustomPlugin attribute object.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.