You are here

public function AjaxAddToCartForm::__construct in Commerce Ajax Add to Cart 8

Constructs a new AjaxAddToCartForm object.

Parameters

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle info.

\Drupal\Component\Datetime\TimeInterface $time: The time.

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

\Drupal\commerce_cart\CartProviderInterface $cart_provider: The cart provider.

\Drupal\commerce_order\Resolver\OrderTypeResolverInterface $order_type_resolver: The order type resolver.

\Drupal\commerce_store\CurrentStoreInterface $current_store: The current store.

\Drupal\commerce_price\Resolver\ChainPriceResolverInterface $chain_price_resolver: The chain base price resolver.

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

\Drupal\dc_ajax_add_cart\RefreshPageElementsHelper $refresh_page_elements_helper: The RefreshPageElementsHelper service.

Overrides AddToCartForm::__construct

File

src/Form/AjaxAddToCartForm.php, line 57

Class

AjaxAddToCartForm
Provides the order item ajax add to cart form.

Namespace

Drupal\dc_ajax_add_cart\Form

Code

public function __construct(EntityManagerInterface $entity_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, CartManagerInterface $cart_manager, CartProviderInterface $cart_provider, OrderTypeResolverInterface $order_type_resolver, CurrentStoreInterface $current_store, ChainPriceResolverInterface $chain_price_resolver, AccountInterface $current_user, RefreshPageElementsHelper $refresh_page_elements_helper) {
  parent::__construct($entity_manager, $entity_type_bundle_info, $time, $cart_manager, $cart_provider, $order_type_resolver, $current_store, $chain_price_resolver, $current_user);
  $this->refreshPageElementsHelper = $refresh_page_elements_helper;
}