Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d8 / plugin-manager / annotation / src / ExamplePluginBase.php.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/plugin-manager/annotation/src/ExamplePluginBase.php.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/plugin-manager/annotation/src/ExamplePluginBase.php.twig
new file mode 100644 (file)
index 0000000..9a08bc5
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+namespace Drupal\{{ machine_name }};
+
+use Drupal\Component\Plugin\PluginBase;
+
+/**
+ * Base class for {{ plugin_type }} plugins.
+ */
+abstract class {{ class_prefix }}PluginBase extends PluginBase implements {{ class_prefix }}Interface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function label() {
+    // Cast the label to a string since it is a TranslatableMarkup object.
+    return (string) $this->pluginDefinition['label'];
+  }
+
+}