1. 8.3.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php PluginExample
  2. 8.0.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php PluginExample
  3. 8.1.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php PluginExample
  4. 8.2.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php PluginExample
  5. 8.4.x core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php PluginExample

Defines a custom Plugin annotation.

Hierarchy

Expanded class hierarchy of PluginExample

Related topics

2 classes are annotated with PluginExample
Example1 in core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example1.php
Provides a test plugin with a custom annotation.
Example2 in core/modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/custom_annotation/Example2.php
Provides a test plugin with a custom annotation.

File

core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php, line 12

Namespace

Drupal\plugin_test\Plugin\Annotation
View source
class PluginExample extends AnnotationBase {

  /**
   * 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,
      'class' => $this->class,
      'provider' => $this->provider,
    );
  }

}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description Overrides
AnnotationBase::$class protected property The class used for this annotated class.
AnnotationBase::$provider protected property The provider of the annotated class.
AnnotationBase::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
AnnotationBase::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId 1
AnnotationBase::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
AnnotationBase::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
AnnotationBase::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
PluginExample::$custom public property Another plugin metadata.
PluginExample::$id public property The plugin ID. Overrides AnnotationBase::$id
PluginExample::get public function Gets the value of an annotation. Overrides AnnotationInterface::get