Version 1
[yaffs-website] / web / core / modules / system / tests / modules / plugin_test / src / Plugin / Annotation / PluginExample.php
diff --git a/web/core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php b/web/core/modules/system/tests/modules/plugin_test/src/Plugin/Annotation/PluginExample.php
new file mode 100644 (file)
index 0000000..b80460d
--- /dev/null
@@ -0,0 +1,40 @@
+<?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 [
+      'id' => $this->id,
+      'custom' => $this->custom,
+      'class' => $this->class,
+      'provider' => $this->provider,
+    ];
+  }
+
+}