You are here

public function CompletionRegister::__construct in Commerce Core 8.2

Constructs a new CompletionRegister 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_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowInterface $checkout_flow: The parent checkout flow.

\Drupal\commerce\CredentialsCheckFloodInterface $credentials_check_flood: The credentials check flood controller.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

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

\Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.

\Drupal\commerce_order\OrderAssignmentInterface $order_assignment: The order assignment.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

\Drupal\user\UserAuthInterface $user_auth: The user authentication object.

Overrides CheckoutPaneBase::__construct

File

modules/checkout/src/Plugin/Commerce/CheckoutPane/CompletionRegister.php, line 108

Class

CompletionRegister
Provides the registration after checkout pane.

Namespace

Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, CheckoutFlowInterface $checkout_flow, CredentialsCheckFloodInterface $credentials_check_flood, AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager, EventDispatcherInterface $event_dispatcher, OrderAssignmentInterface $order_assignment, RequestStack $request_stack, UserAuthInterface $user_auth) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $checkout_flow, $entity_type_manager);
  $this->credentialsCheckFlood = $credentials_check_flood;
  $this->currentUser = $current_user;
  $this->clientIp = $request_stack
    ->getCurrentRequest()
    ->getClientIp();
  $this->eventDispatcher = $event_dispatcher;
  $this->orderAssignment = $order_assignment;
  $this->userAuth = $user_auth;
  $this->userStorage = $entity_type_manager
    ->getStorage('user');
}