function HelpSection::__construct

Same name in other branches
  1. 11.x core/modules/help/src/Attribute/HelpSection.php \Drupal\help\Attribute\HelpSection::__construct()

Constructs a HelpSection attribute.

Parameters

string $id: The plugin ID.

\Drupal\Core\StringTranslation\TranslatableMarkup $title: The text to use as the title of the help page section.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $description: (optional) The description of the help page section.

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.

int|null $weight: (optional) The weight of the help page section.

class-string|null $deriver: (optional) The deriver class.

The sections will be ordered by this weight on the help page.

Overrides Plugin::__construct

File

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

Class

HelpSection
Defines a HelpSection attribute object for plugin discovery.

Namespace

Drupal\help\Attribute

Code

public function __construct(string $id, TranslatableMarkup $title, ?TranslatableMarkup $description = NULL, ?string $permission = NULL, ?int $weight = NULL, ?string $deriver = NULL) {
}

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