You are here

public function CartUpdateItemsResource::__construct in Commerce Cart API 8

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

\Symfony\Component\Serializer\SerializerInterface $serializer: The serializer.

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

Overrides CartResourceBase::__construct

File

src/Plugin/rest/resource/CartUpdateItemsResource.php, line 65

Class

CartUpdateItemsResource
Provides a cart collection resource for current session.

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, SerializerInterface $serializer, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition, $serializer_formats, $logger, $cart_provider, $cart_manager);
  $this->serializer = $serializer;
  $this->entityTypeManager = $entity_type_manager;
}