function SystemMenuBlock::__construct

Same name in this branch
  1. 8.9.x core/modules/system/src/Plugin/Block/SystemMenuBlock.php \Drupal\system\Plugin\Block\SystemMenuBlock::__construct()
Same name in other branches
  1. 9 core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php \Drupal\system\Plugin\Derivative\SystemMenuBlock::__construct()
  2. 9 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. 11.x core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php \Drupal\system\Plugin\Derivative\SystemMenuBlock::__construct()
  6. 11.x core/modules/system/src/Plugin/Block/SystemMenuBlock.php \Drupal\system\Plugin\Block\SystemMenuBlock::__construct()

Constructs new SystemMenuBlock.

Parameters

\Drupal\Core\Entity\EntityStorageInterface $menu_storage: The menu storage.

File

core/modules/system/src/Plugin/Derivative/SystemMenuBlock.php, line 30

Class

SystemMenuBlock
Provides block plugin definitions for custom menus.

Namespace

Drupal\system\Plugin\Derivative

Code

public function __construct(EntityStorageInterface $menu_storage) {
    $this->menuStorage = $menu_storage;
}

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