You are here

public function UltimenuBlock::__construct in Ultimenu 8.2

Same name in this branch
  1. 8.2 src/Plugin/Derivative/UltimenuBlock.php \Drupal\ultimenu\Plugin\Derivative\UltimenuBlock::__construct()
  2. 8.2 src/Plugin/Block/UltimenuBlock.php \Drupal\ultimenu\Plugin\Block\UltimenuBlock::__construct()
Same name and namespace in other branches
  1. 8 src/Plugin/Block/UltimenuBlock.php \Drupal\ultimenu\Plugin\Block\UltimenuBlock::__construct()

Constructs an UltimenuBlock object.

Parameters

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

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Session\AccountInterface $current_user: The ultimenu manager.

\Drupal\Core\Asset\LibraryDiscoveryInterface $library_discovery: The ultimenu manager.

\Drupal\ultimenu\UltimenuManagerInterface $ultimenu_manager: The ultimenu manager.

\Drupal\ultimenu\UltimenuSkinInterface $ultimenu_skin: The ultimenu skin service.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/UltimenuBlock.php, line 73

Class

UltimenuBlock
Provides an 'Ultimenu' block.

Namespace

Drupal\ultimenu\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountInterface $current_user, LibraryDiscoveryInterface $library_discovery, UltimenuManagerInterface $ultimenu_manager, UltimenuSkinInterface $ultimenu_skin) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $current_user;
  $this->libraryDiscovery = $library_discovery;
  $this->ultimenuManager = $ultimenu_manager;
  $this->ultimenuSkin = $ultimenu_skin;
}