function MenuRouterRebuildSubscriber::__construct

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php \Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber::__construct()
  2. 10 core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php \Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber::__construct()
  3. 11.x core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php \Drupal\Core\EventSubscriber\MenuRouterRebuildSubscriber::__construct()

Constructs the MenuRouterRebuildSubscriber object.

Parameters

\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend.

\Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager: The menu link plugin manager.

\Drupal\Core\Database\Connection $connection: The database connection.

\Drupal\Core\Database\ReplicaKillSwitch $replica_kill_switch: The replica kill switch.

File

core/lib/Drupal/Core/EventSubscriber/MenuRouterRebuildSubscriber.php, line 56

Class

MenuRouterRebuildSubscriber
Rebuilds the default menu links and runs menu-specific code if necessary.

Namespace

Drupal\Core\EventSubscriber

Code

public function __construct(LockBackendInterface $lock, MenuLinkManagerInterface $menu_link_manager, Connection $connection, ReplicaKillSwitch $replica_kill_switch) {
    $this->lock = $lock;
    $this->menuLinkManager = $menu_link_manager;
    $this->connection = $connection;
    $this->replicaKillSwitch = $replica_kill_switch;
}

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