You are here

public function CartResourceBase::__construct in Commerce Cart API 8

Constructs a new CartResourceBase 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.

array $serializer_formats: The available serialization formats.

\Psr\Log\LoggerInterface $logger: A logger instance.

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

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

Overrides ResourceBase::__construct

4 calls to CartResourceBase::__construct()
CartAddResource::__construct in src/Plugin/rest/resource/CartAddResource.php
Constructs a new CartAddResource object.
CartCouponsResource::__construct in src/Plugin/rest/resource/CartCouponsResource.php
Constructs a new CartUpdateItemsResource object.
CartUpdateItemResource::__construct in src/Plugin/rest/resource/CartUpdateItemResource.php
Constructs a new CartUpdateItemResource object.
CartUpdateItemsResource::__construct in src/Plugin/rest/resource/CartUpdateItemsResource.php
Constructs a new CartUpdateItemsResource object.
4 methods override CartResourceBase::__construct()
CartAddResource::__construct in src/Plugin/rest/resource/CartAddResource.php
Constructs a new CartAddResource object.
CartCouponsResource::__construct in src/Plugin/rest/resource/CartCouponsResource.php
Constructs a new CartUpdateItemsResource object.
CartUpdateItemResource::__construct in src/Plugin/rest/resource/CartUpdateItemResource.php
Constructs a new CartUpdateItemResource object.
CartUpdateItemsResource::__construct in src/Plugin/rest/resource/CartUpdateItemsResource.php
Constructs a new CartUpdateItemsResource object.

File

src/Plugin/rest/resource/CartResourceBase.php, line 48

Class

CartResourceBase
Abstract base class for cart resoruces.

Namespace

Drupal\commerce_cart_api\Plugin\rest\resource

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, array $serializer_formats, LoggerInterface $logger, CartProviderInterface $cart_provider, CartManagerInterface $cart_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $serializer_formats, $logger);
  $this->cartProvider = $cart_provider;
  $this->cartManager = $cart_manager;
}