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

Namespace

Drupal\plugin_test\Plugin\Annotation

File

core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php
View source
<?php

namespace Drupal\plugin_test\Plugin\Annotation;

use Drupal\Component\Annotation\AnnotationBase;

/**
 * Defines a custom Plugin annotation.
 *
 * @Annotation
 */
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,
    );
  }

}

Classes

Namesort descending Description
PluginExample Defines a custom Plugin annotation.