Version 1
[yaffs-website] / web / core / modules / help / src / Plugin / HelpSection / HelpSectionPluginBase.php
diff --git a/web/core/modules/help/src/Plugin/HelpSection/HelpSectionPluginBase.php b/web/core/modules/help/src/Plugin/HelpSection/HelpSectionPluginBase.php
new file mode 100644 (file)
index 0000000..0439eca
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+
+namespace Drupal\help\Plugin\HelpSection;
+
+use Drupal\Core\Cache\UnchangingCacheableDependencyTrait;
+use Drupal\Core\Plugin\PluginBase;
+use Drupal\help\HelpSectionPluginInterface;
+
+/**
+ * Provides a base class for help section plugins.
+ *
+ * @see \Drupal\help\HelpSectionPluginInterface
+ * @see \Drupal\help\Annotation\HelpSection
+ * @see \Drupal\help\HelpSectionManager
+ */
+abstract class HelpSectionPluginBase extends PluginBase implements HelpSectionPluginInterface {
+
+  use UnchangingCacheableDependencyTrait;
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getTitle() {
+    return $this->getPluginDefinition()['title'];
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getDescription() {
+    return $this->getPluginDefinition()['description'];
+  }
+
+}