You are here

public function MenuPositionLink::__construct in Menu Position 8

Same name in this branch
  1. 8 src/Plugin/Derivative/MenuPositionLink.php \Drupal\menu_position\Plugin\Derivative\MenuPositionLink::__construct()
  2. 8 src/Plugin/Menu/MenuPositionLink.php \Drupal\menu_position\Plugin\Menu\MenuPositionLink::__construct()

Menu position link constructor.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $menu_position_rule_storage: The menu_position_rule storage.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

File

src/Plugin/Derivative/MenuPositionLink.php, line 46

Class

MenuPositionLink
Provides menu links for Menu Position Rules.

Namespace

Drupal\menu_position\Plugin\Derivative

Code

public function __construct(EntityTypeManagerInterface $menu_position_rule_storage, ConfigFactoryInterface $config_factory) {
  $this->storage = $menu_position_rule_storage
    ->getStorage('menu_position_rule');
  $this->config_factory = $config_factory;
}