Skip to content
Snippets Groups Projects
Commit 75194e9c authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2856625 by swarad07, Yogesh Pawar: Remove unused menu active trail...

Issue #2856625 by swarad07, Yogesh Pawar: Remove unused menu active trail service from SystemMenuBlock
parent 23d140fd
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
use Drupal\Core\Block\BlockBase; use Drupal\Core\Block\BlockBase;
use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\Cache;
use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Menu\MenuActiveTrailInterface;
use Drupal\Core\Menu\MenuLinkTreeInterface; use Drupal\Core\Menu\MenuLinkTreeInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
...@@ -29,13 +28,6 @@ class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterfa ...@@ -29,13 +28,6 @@ class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterfa
*/ */
protected $menuTree; protected $menuTree;
/**
* The active menu trail service.
*
* @var \Drupal\Core\Menu\MenuActiveTrailInterface
*/
protected $menuActiveTrail;
/** /**
* Constructs a new SystemMenuBlock. * Constructs a new SystemMenuBlock.
* *
...@@ -47,13 +39,10 @@ class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterfa ...@@ -47,13 +39,10 @@ class SystemMenuBlock extends BlockBase implements ContainerFactoryPluginInterfa
* The plugin implementation definition. * The plugin implementation definition.
* @param \Drupal\Core\Menu\MenuLinkTreeInterface $menu_tree * @param \Drupal\Core\Menu\MenuLinkTreeInterface $menu_tree
* The menu tree service. * The menu tree service.
* @param \Drupal\Core\Menu\MenuActiveTrailInterface $menu_active_trail
* The active menu trail service.
*/ */
public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuLinkTreeInterface $menu_tree, MenuActiveTrailInterface $menu_active_trail) { public function __construct(array $configuration, $plugin_id, $plugin_definition, MenuLinkTreeInterface $menu_tree) {
parent::__construct($configuration, $plugin_id, $plugin_definition); parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->menuTree = $menu_tree; $this->menuTree = $menu_tree;
$this->menuActiveTrail = $menu_active_trail;
} }
/** /**
...@@ -64,8 +53,7 @@ public static function create(ContainerInterface $container, array $configuratio ...@@ -64,8 +53,7 @@ public static function create(ContainerInterface $container, array $configuratio
$configuration, $configuration,
$plugin_id, $plugin_id,
$plugin_definition, $plugin_definition,
$container->get('menu.link_tree'), $container->get('menu.link_tree')
$container->get('menu.active_trail')
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment