function Block::__construct

Same name in this branch
  1. 11.x core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::__construct()
Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::__construct()
  2. 8.9.x core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::__construct()
  3. 10 core/modules/views/src/Plugin/views/display/Block.php \Drupal\views\Plugin\views\display\Block::__construct()
  4. 10 core/lib/Drupal/Core/Block/Attribute/Block.php \Drupal\Core\Block\Attribute\Block::__construct()

Constructs a Block attribute.

Parameters

string $id: The plugin ID.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $admin_label: The administrative label of the block.

\Drupal\Core\StringTranslation\TranslatableMarkup|null $category: (optional) The category in the admin UI where the block will be listed.

\Drupal\Core\Plugin\Context\ContextDefinitionInterface[] $context_definitions: (optional) An array of context definitions describing the context used by the plugin. The array is keyed by context names.

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

array<string, string|false> $forms: (optional) An array of form class names or FALSE, keyed by a string.

Overrides Plugin::__construct

File

core/lib/Drupal/Core/Block/Attribute/Block.php, line 31

Class

Block
The Block attribute.

Namespace

Drupal\Core\Block\Attribute

Code

public function __construct(string $id, ?TranslatableMarkup $admin_label = NULL, ?TranslatableMarkup $category = NULL, array $context_definitions = [], ?string $deriver = NULL, array $forms = []) {
}

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