8a725f97941f114d4de136190f77d9f8135389cc
[yaffs-website] / web / core / modules / help / src / HelpSectionPluginInterface.php
1 <?php
2
3 namespace Drupal\help;
4
5 use Drupal\Component\Plugin\PluginInspectionInterface;
6 use Drupal\Core\Cache\CacheableDependencyInterface;
7
8 /**
9  * Provides an interface for a plugin for a section of the /admin/help page.
10  *
11  * Plugins of this type need to be annotated with
12  * \Drupal\help\Annotation\HelpSection annotation, and placed in the
13  * Plugin\HelpSection namespace directory. They are managed by the
14  * \Drupal\help\HelpSectionManager plugin manager class. There is a base
15  * class that may be helpful:
16  * \Drupal\help\Plugin\HelpSection\HelpSectionPluginBase.
17  */
18 interface HelpSectionPluginInterface extends PluginInspectionInterface, CacheableDependencyInterface {
19
20
21   /**
22    * Returns the title of the help section.
23    *
24    * @return string
25    *   The title text, which could be a plain string or an object that can be
26    *   cast to a string.
27    */
28   public function getTitle();
29
30   /**
31    * Returns the description text for the help section.
32    *
33    * @return string
34    *   The description text, which could be a plain string or an object that
35    *   can be cast to a string.
36    */
37   public function getDescription();
38
39   /**
40    * Returns a list of topics to show in the help section.
41    *
42    * @return array
43    *   A sorted list of topic links or render arrays for topic links. The links
44    *   will be shown in the help section; if the returned array of links is
45    *   empty, the section will be shown with some generic empty text.
46    */
47   public function listTopics();
48
49 }