Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / module / plugin-manager / src / Plugin / Model / Example.php.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/module/plugin-manager/src/Plugin/Model/Example.php.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/module/plugin-manager/src/Plugin/Model/Example.php.twig
new file mode 100644 (file)
index 0000000..50ef3b9
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\{{ machine_name }}\Plugin\{{ class_prefix }};
+
+use Drupal\{{ machine_name }}\{{ class_prefix }}PluginBase;
+
+/**
+ * Example plugin implementation of the {{ machine_name }}.
+ *
+ * @{{ class_prefix }}(
+ *   id = "example",
+ *   label = @Translation("Example"),
+ *   description = @Translation("Example description.")
+ * )
+ */
+class Example extends {{ class_prefix }}PluginBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function method1() {
+    return __CLASS__ . ' implementation of ' . __FUNCTION__;
+  }
+
+}