phpDocumentor

OrderItemRepository
in package
implements OrderItemRepositoryInterface

Class OrderItemRepository

Tags
category

System

subpackage

Repositories

Interfaces, Classes and Traits

OrderItemRepositoryInterface
Interface OrderItemRepositoryInterface

Table of Contents

$addonValueService  : AddonValueServiceInterface
Addon value service.
$orderItemAttributeRepositoryFactory  : OrderItemAttributeRepositoryFactoryInterface
Order item attribute repository factory.
$orderItemRepositoryDeleter  : OrderItemRepositoryDeleterInterface
Order item repository deleter.
$orderItemRepositoryReader  : OrderItemRepositoryReaderInterface
Order item repository reader.
$orderItemRepositoryWriter  : OrderItemRepositoryWriterInterface
Order item repository writer.
__construct()  : mixed
OrderItemRepository constructor.
addToOrder()  : int
Adds an order item to the order item repository.
deleteItemById()  : OrderItemRepository
Deletes an order item from the repository by the given order item ID.
deleteItemsByOrderId()  : OrderItemRepository
Deletes order items from the repository by the given order ID.
getItemById()  : StoredOrderItemInterface
Returns a stored order ID by the given order item ID.
getItemsByOrderId()  : StoredOrderItemCollection
Returns a stored order item collection by the given order ID.
store()  : OrderItemRepository
Saves the order item in the repository.
_delegateToAttributeRepositories()  : $this
Delegate to the attribute repository and save the attributes of the passed order item.

Properties

Methods

__construct()

OrderItemRepository constructor.

public __construct(OrderItemAttributeRepositoryFactoryInterface $orderItemAttributeRepositoryFactory, OrderItemRepositoryReaderInterface $orderItemRepositoryReader, OrderItemRepositoryWriterInterface $orderItemRepositoryWriter, OrderItemRepositoryDeleterInterface $orderItemRepositoryDeleter, AddonValueServiceInterface $addonValueService) : mixed
Parameters
$orderItemAttributeRepositoryFactory : OrderItemAttributeRepositoryFactoryInterface

Factory to create order item attribute repositories.

$orderItemRepositoryReader : OrderItemRepositoryReaderInterface

Db reader for order item repository.

$orderItemRepositoryWriter : OrderItemRepositoryWriterInterface

Db writer for order item repository.

$orderItemRepositoryDeleter : OrderItemRepositoryDeleterInterface

Db deleter for order item repository.

$addonValueService : AddonValueServiceInterface

Addon value service.

Return values
mixed

_delegateToAttributeRepositories()

Delegate to the attribute repository and save the attributes of the passed order item.

protected _delegateToAttributeRepositories(OrderItemInterface $orderItem[, int|null $storedOrderItemId = null ]) : $this
Parameters
$orderItem : OrderItemInterface

Order item which contain the attributes.

$storedOrderItemId : int|null = null

(Optional) Id of order item. When not set, its get by stored order item.

Return values
$this

Same instance to make chained method calls possible.

Search results