class PluginExample

Defines a custom Plugin annotation.

Hierarchy

Expanded class hierarchy of PluginExample

2 files declare their use of PluginExample
Example1.php in drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/custom_annotation/Example1.php
Contains \Drupal\plugin_test\Plugin\plugin_test\custom_annotation\Example1.
Example2.php in drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/custom_annotation/Example2.php
Contains \Drupal\plugin_test\Plugin\plugin_test\custom_annotation\Example2.
2 classes are annotated with PluginExample
Example1 in drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/custom_annotation/Example1.php
Provides a test plugin with a custom annotation.
Example2 in drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/plugin_test/custom_annotation/Example2.php
Provides a test plugin with a custom annotation.

File

drupal/core/modules/system/tests/modules/plugin_test/lib/Drupal/plugin_test/Plugin/Annotation/PluginExample.php, line 17
Contains \Drupal\plugin_test\Plugin\Annotation\PluginExample.

Namespace

Drupal\plugin_test\Plugin\Annotation
View source
class PluginExample implements AnnotationInterface {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * Another plugin metadata.
   *
   * @var string
   */
  public $custom;

  /**
   * {@inheritdoc}
   */
  public function get() {
    return array(
      'id' => $this->id,
      'custom' => $this->custom,
    );
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PluginExample::$custom public property Another plugin metadata.
PluginExample::$id public property The plugin ID.
PluginExample::get public function Returns the value of an annotation. Overrides AnnotationInterface::get