interface HelpSectionPluginInterface

Same name in other branches
  1. 9 core/modules/help/src/HelpSectionPluginInterface.php \Drupal\help\HelpSectionPluginInterface
  2. 10 core/modules/help/src/HelpSectionPluginInterface.php \Drupal\help\HelpSectionPluginInterface
  3. 11.x core/modules/help/src/HelpSectionPluginInterface.php \Drupal\help\HelpSectionPluginInterface

Provides an interface for a plugin for a section of the /admin/help page.

Plugins of this type need to be annotated with \Drupal\help\Annotation\HelpSection annotation, and placed in the Plugin\HelpSection namespace directory. They are managed by the \Drupal\help\HelpSectionManager plugin manager class. There is a base class that may be helpful: \Drupal\help\Plugin\HelpSection\HelpSectionPluginBase.

Hierarchy

Expanded class hierarchy of HelpSectionPluginInterface

All classes that implement HelpSectionPluginInterface

1 file declares its use of HelpSectionPluginInterface
HelpSectionPluginBase.php in core/modules/help/src/Plugin/HelpSection/HelpSectionPluginBase.php

File

core/modules/help/src/HelpSectionPluginInterface.php, line 18

Namespace

Drupal\help
View source
interface HelpSectionPluginInterface extends PluginInspectionInterface, CacheableDependencyInterface {
    
    /**
     * Returns the title of the help section.
     *
     * @return string
     *   The title text, which could be a plain string or an object that can be
     *   cast to a string.
     */
    public function getTitle();
    
    /**
     * Returns the description text for the help section.
     *
     * @return string
     *   The description text, which could be a plain string or an object that
     *   can be cast to a string.
     */
    public function getDescription();
    
    /**
     * Returns a list of topics to show in the help section.
     *
     * @return array
     *   A sorted list of topic links or render arrays for topic links. The links
     *   will be shown in the help section; if the returned array of links is
     *   empty, the section will be shown with some generic empty text.
     */
    public function listTopics();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. 34
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. 34
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. 27
HelpSectionPluginInterface::getDescription public function Returns the description text for the help section. 1
HelpSectionPluginInterface::getTitle public function Returns the title of the help section. 1
HelpSectionPluginInterface::listTopics public function Returns a list of topics to show in the help section. 5
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 6
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.