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 / yaml / src / ExampleDefault.php.twig
diff --git a/vendor/chi-teck/drupal-code-generator/templates/d8/plugin-manager/yaml/src/ExampleDefault.php.twig b/vendor/chi-teck/drupal-code-generator/templates/d8/plugin-manager/yaml/src/ExampleDefault.php.twig
new file mode 100644 (file)
index 0000000..5197526
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+namespace Drupal\{{ machine_name }};
+
+use Drupal\Core\Plugin\PluginBase;
+
+/**
+ * Default class used for {{ plugin_type|plural }} plugins.
+ */
+class {{ class_prefix }}Default extends PluginBase implements {{ class_prefix }}Interface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function label() {
+    // The title from YAML file discovery may be a TranslatableMarkup object.
+    return (string) $this->pluginDefinition['label'];
+  }
+
+}