You are here

public function CartBlock::__construct in Ubercart 8.4

Creates a CartBlock instance.

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\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\uc_cart\CartManagerInterface $cart_manager: The cart manager.

Overrides BlockPluginTrait::__construct

File

uc_cart/src/Plugin/Block/CartBlock.php, line 63

Class

CartBlock
Provides the shopping cart block.

Namespace

Drupal\uc_cart\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, CartManagerInterface $cart_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->configFactory = $config_factory;
  $this->moduleHandler = $module_handler;
  $this->cartManager = $cart_manager;
}