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 * Returns the title of the help section.
|
Chris@0
|
22 *
|
Chris@0
|
23 * @return string
|
Chris@0
|
24 * The title text, which could be a plain string or an object that can be
|
Chris@0
|
25 * cast to a string.
|
Chris@0
|
26 */
|
Chris@0
|
27 public function getTitle();
|
Chris@0
|
28
|
Chris@0
|
29 /**
|
Chris@0
|
30 * Returns the description text for the help section.
|
Chris@0
|
31 *
|
Chris@0
|
32 * @return string
|
Chris@0
|
33 * The description text, which could be a plain string or an object that
|
Chris@0
|
34 * can be cast to a string.
|
Chris@0
|
35 */
|
Chris@0
|
36 public function getDescription();
|
Chris@0
|
37
|
Chris@0
|
38 /**
|
Chris@0
|
39 * Returns a list of topics to show in the help section.
|
Chris@0
|
40 *
|
Chris@0
|
41 * @return array
|
Chris@0
|
42 * A sorted list of topic links or render arrays for topic links. The links
|
Chris@0
|
43 * will be shown in the help section; if the returned array of links is
|
Chris@0
|
44 * empty, the section will be shown with some generic empty text.
|
Chris@0
|
45 */
|
Chris@0
|
46 public function listTopics();
|
Chris@0
|
47
|
Chris@0
|
48 }
|