You are here

public function EmptyCartButton::__construct in Commerce Core 8.2

Constructs a new EmptyCartButton 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\commerce_cart\CartManagerInterface $cart_manager: The cart manager.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.

Overrides HandlerBase::__construct

File

modules/cart/src/Plugin/views/area/EmptyCartButton.php, line 56

Class

EmptyCartButton
Defines an area handler for the "Empty cart" button.

Namespace

Drupal\commerce_cart\Plugin\views\area

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, CartManagerInterface $cart_manager, EntityTypeManagerInterface $entity_type_manager, MessengerInterface $messenger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->cartManager = $cart_manager;
  $this->entityTypeManager = $entity_type_manager;
  $this->messenger = $messenger;
}