function SystemMenuBlock::__construct

Same name in this branch
  1. main core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php \Drupal\system\Plugin\Derivative\SystemMenuBlock::__construct()
Same name and namespace in other branches
  1. 11.x core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php \Drupal\system\Plugin\Derivative\SystemMenuBlock::__construct()
  2. 11.x core/modules/system/src/Plugin/Block/SystemMenuBlock.php \Drupal\system\Plugin\Block\SystemMenuBlock::__construct()
  3. 10 core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php \Drupal\system\Plugin\Derivative\SystemMenuBlock::__construct()
  4. 10 core/modules/system/src/Plugin/Block/SystemMenuBlock.php \Drupal\system\Plugin\Block\SystemMenuBlock::__construct()
  5. 9 core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php \Drupal\system\Plugin\Derivative\SystemMenuBlock::__construct()
  6. 9 core/modules/system/src/Plugin/Block/SystemMenuBlock.php \Drupal\system\Plugin\Block\SystemMenuBlock::__construct()
  7. 8.9.x core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php \Drupal\system\Plugin\Derivative\SystemMenuBlock::__construct()
  8. 8.9.x core/modules/system/src/Plugin/Block/SystemMenuBlock.php \Drupal\system\Plugin\Block\SystemMenuBlock::__construct()

Constructs a new SystemMenuBlock.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

array $plugin_definition: The plugin implementation definition.

\Drupal\Core\Menu\MenuLinkTreeInterface $menuTree: The menu tree service.

\Drupal\Core\Menu\MenuActiveTrailInterface $menuActiveTrail: The active menu trail service.

Overrides BlockPluginTrait::__construct

File

core/modules/system/src/Plugin/Block/SystemMenuBlock.php, line 41

Class

SystemMenuBlock
Provides a generic Menu block.

Namespace

Drupal\system\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, protected MenuLinkTreeInterface $menuTree, protected MenuActiveTrailInterface $menuActiveTrail) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
}

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