OrderStatusRepository

Implements \OrderStatusRepositoryInterface

Class OrderStatusRepository

category

System

package

OrderStatus

subpackage

Repositories

Methods

OrderStatusRepository constructor.

__construct(\OrderStatusFactoryInterface $factory, \OrderStatusReaderInterface $reader, \OrderStatusWriterInterface $writer, \OrderStatusDeleterInterface $deleter, \LanguageProvider $languageProvider) 

Arguments

$factory

\OrderStatusFactoryInterface

Factory instance to create order status entities.

$reader

\OrderStatusReaderInterface

Reader instance to fetch data from the storage.

$writer

\OrderStatusWriterInterface

Writer instance to add or update data in the storage.

$deleter

\OrderStatusDeleterInterface

Deleter instance to remove data from the storage.

$languageProvider

\LanguageProvider

Provider instance to get language codes from language ids.

Creates a new order status.

create(\OrderStatus $orderStatus) : integer

Arguments

$orderStatus

\OrderStatus

Order status entity with new data.

Response

integer

Id of new order status entity.

Returns an order status entity by the given order status id. If no data was found, null is returned.

find(\IntType $orderStatusId) : \OrderStatus|null

Arguments

$orderStatusId

\IntType

Id of expected OrderStatus entity.

Response

\OrderStatus|null

Whether the found order status entity or null.

Returns a collection with all order status.

findAll() : \OrderStatusCollection

Response

\OrderStatusCollection

Collection of all order status resources.

Returns an order status entity by the given order status id. If no data was found, an exception is thrown.

get(\IntType $orderStatusId) : \OrderStatus
Throws
\OrderStatusNotFoundException

If expected order status entity was not found by the given id.

Arguments

$orderStatusId

\IntType

Id of expected OrderStatus entity.

Response

\OrderStatus

Expected order status entity.

Removes an order status.

remove(\IntType $orderStatusId) : $this|\OrderStatusRepositoryInterface

Arguments

$orderStatusId

\IntType

Id of order status entity to be removed.

Response

$this|\OrderStatusRepositoryInterface

Same instance for chained method calls.

Updates an order status.

update(\OrderStatus $orderStatus) : $this|\OrderStatusRepositoryInterface

Arguments

$orderStatus

\OrderStatus

Order status entity with updated data.

Response

$this|\OrderStatusRepositoryInterface

Same instance for chained method calls.

Properties

factory

factory : \OrderStatusFactoryInterface

reader

reader : \OrderStatusReaderInterface

writer

writer : \OrderStatusWriterInterface

deleter

deleter : \OrderStatusDeleterInterface

languageProvider

languageProvider : \LanguageProvider
var

Type(s)

\LanguageProvider