function PluginExample::__construct

Same name in other branches
  1. 10 core/modules/system/tests/modules/plugin_test/src/Plugin/Attribute/PluginExample.php \Drupal\plugin_test\Plugin\Attribute\PluginExample::__construct()

Constructs a PluginExample attribute.

Parameters

string $id: The plugin ID.

string $custom: Some other sample plugin metadata.

Overrides Plugin::__construct

File

core/modules/system/tests/modules/plugin_test/src/Plugin/Attribute/PluginExample.php, line 23

Class

PluginExample
Defines a custom PluginExample attribute.

Namespace

Drupal\plugin_test\Plugin\Attribute

Code

public function __construct(string $id, ?string $custom = NULL) {
}

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