Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HelpSection.php

class HelpSection

Same name in this branch
  1. 11.1.x core/modules/help/src/Annotation/HelpSection.php \Drupal\help\Annotation\HelpSection

Defines a HelpSection attribute object for plugin discovery.

Plugin Namespace: Plugin\HelpSection

For a working example, see \Drupal\help\Plugin\HelpSection\HookHelpSection.

Hierarchy

  • class \Drupal\Component\Plugin\Attribute\AttributeBase implements \Drupal\Component\Plugin\Attribute\AttributeInterface
    • class \Drupal\Component\Plugin\Attribute\Plugin extends \Drupal\Component\Plugin\Attribute\AttributeBase
      • class \Drupal\help\Attribute\HelpSection extends \Drupal\Component\Plugin\Attribute\Plugin

Expanded class hierarchy of HelpSection

See also

\Drupal\help\HelpSectionPluginInterface

\Drupal\help\Plugin\HelpSection\HelpSectionPluginBase

\Drupal\help\HelpSectionManager

hook_help_section_info_alter()

Plugin API

3 files declare their use of HelpSection
HelpSectionManager.php in core/modules/help/src/HelpSectionManager.php
HelpTopicSection.php in core/modules/help/src/Plugin/HelpSection/HelpTopicSection.php
HookHelpSection.php in core/modules/help/src/Plugin/HelpSection/HookHelpSection.php

File

core/modules/help/src/Attribute/HelpSection.php, line 23

Namespace

Drupal\help\Attribute
View source
class HelpSection extends Plugin {
    
    /**
     * Constructs a HelpSection attribute.
     *
     * @param string $id
     *   The plugin ID.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup $title
     *   The text to use as the title of the help page section.
     * @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $description
     *   (optional) The description of the help page section.
     * @param string|null $permission
     *   (optional) The permission required to access the help page section.
     *
     *   Only set if this section needs its own permission, beyond the generic
     *   'access help pages' permission needed to see the /admin/help
     *   page itself.
     * @param int|null $weight
     *   (optional) The weight of the help page section.
     * @param class-string|null $deriver
     *   (optional) The deriver class.
     *
     *   The sections will be ordered by this weight on the help page.
     */
    public function __construct(string $id, TranslatableMarkup $title, ?TranslatableMarkup $description = NULL, ?string $permission = NULL, ?int $weight = NULL, ?string $deriver = NULL) {
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
AttributeBase::$class protected property The class used for this attribute class.
AttributeBase::$provider protected property The provider of the attribute class.
AttributeBase::get public function Gets the value of an attribute. Overrides AttributeInterface::get 6
AttributeBase::getClass public function Gets the class of the attribute class. Overrides AttributeInterface::getClass 1
AttributeBase::getId public function Gets the unique ID for this attribute class. Overrides AttributeInterface::getId
AttributeBase::getProvider public function Gets the name of the provider of the attribute class. Overrides AttributeInterface::getProvider
AttributeBase::setClass public function Sets the class of the attributed class. Overrides AttributeInterface::setClass 1
AttributeBase::setProvider public function Sets the name of the provider of the attribute class. Overrides AttributeInterface::setProvider
HelpSection::__construct public function Constructs a HelpSection attribute. Overrides Plugin::__construct

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal