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