QuickEditProductSpecialPricesRepository
in package
implements
QuickEditProductSpecialPricesRepositoryInterface
Class QuickEditProductSpecialPricesRepository
Tags
Interfaces, Classes and Traits
- QuickEditProductSpecialPricesRepositoryInterface
- Interface QuickEditProductSpecialPricesRepositoryInterface
Table of Contents
- $length : IntType
- $orderBy : StringType
- $specialPriceReader : QuickEditProductSpecialPricesReaderInterface
- $specialPriceWriter : QuickEditProductSpecialPricesWriterInterface
- $start : IntType
- __construct() : mixed
- QuickEditProductSpecialPricesRepository constructor.
- getFilteredSpecialPrices() : array<string|int, mixed>
- Returns the special prices of the indicated products.
- getFilteredSpecialPricesCount() : int
- Returns the record number of the filtered special prices.
- getSpecialPricesCount() : int
- Get special prices record count.
- paginateSpecialPrices() : QuickEditProductSpecialPricesRepository
- Sets the starting point of the pagination and the number of special prices.
- setSpecialPriceById() : bool
- Saves the changed data regarding the special price.
- sortSpecialPrices() : QuickEditProductSpecialPricesRepository
- Sets the sorting order of the special prices.
- _collectionContentArray() : array<string|int, mixed>
- Returns an array of QuickEditProductSpecialPriceListItem.
Properties
$length
protected
IntType
$length
$orderBy
protected
StringType
$orderBy
$specialPriceReader
protected
QuickEditProductSpecialPricesReaderInterface
$specialPriceReader
$specialPriceWriter
protected
QuickEditProductSpecialPricesWriterInterface
$specialPriceWriter
$start
protected
IntType
$start
Methods
__construct()
QuickEditProductSpecialPricesRepository constructor.
public
__construct(QuickEditProductSpecialPricesReaderInterface $specialPricesReader, QuickEditProductSpecialPricesWriterInterface $specialPricesWriter) : mixed
Parameters
- $specialPricesReader : QuickEditProductSpecialPricesReaderInterface
-
Special prices reader.
- $specialPricesWriter : QuickEditProductSpecialPricesWriterInterface
-
Special prices writer.
Return values
mixed —getFilteredSpecialPrices()
Returns the special prices of the indicated products.
public
getFilteredSpecialPrices(array<string|int, mixed> $productIds, array<string|int, mixed> $filterParameters) : array<string|int, mixed>
Parameters
- $productIds : array<string|int, mixed>
-
Array containing the product IDs to be processed.
- $filterParameters : array<string|int, mixed>
-
Contains filter parameters.
Return values
array<string|int, mixed> —Returns the query result as a pure array, or an empty array when no result is produced.
getFilteredSpecialPricesCount()
Returns the record number of the filtered special prices.
public
getFilteredSpecialPricesCount(array<string|int, mixed> $productIds, array<string|int, mixed> $filterParameters) : int
Parameters
- $productIds : array<string|int, mixed>
-
Array containing the product IDs to be processed.
- $filterParameters : array<string|int, mixed>
-
Contains filter parameters.
Return values
int —Returns the number of special prices found.
getSpecialPricesCount()
Get special prices record count.
public
getSpecialPricesCount() : int
Return values
int —Returns the number of all special prices found.
paginateSpecialPrices()
Sets the starting point of the pagination and the number of special prices.
public
paginateSpecialPrices([IntType|null $start = null ][, IntType|null $length = null ]) : QuickEditProductSpecialPricesRepository
Parameters
- $start : IntType|null = null
-
Pagination start index.
- $length : IntType|null = null
-
Page length value.
Return values
QuickEditProductSpecialPricesRepository —QuickEdit products special price repository for chained method calls.
setSpecialPriceById()
Saves the changed data regarding the special price.
public
setSpecialPriceById(array<string|int, mixed> $specialPrice) : bool
Parameters
- $specialPrice : array<string|int, mixed>
-
Contains the special prices data.
Return values
bool —Returns the operation result.
sortSpecialPrices()
Sets the sorting order of the special prices.
public
sortSpecialPrices([StringType|null $orderBy = null ]) : QuickEditProductSpecialPricesRepository
Parameters
- $orderBy : StringType|null = null
-
Sorting order (ASC or DESC)
Return values
QuickEditProductSpecialPricesRepository —QuickEdit products special price repository for chained method calls.
_collectionContentArray()
Returns an array of QuickEditProductSpecialPriceListItem.
protected
_collectionContentArray(array<string|int, mixed> $specialPrices) : array<string|int, mixed>
Parameters
- $specialPrices : array<string|int, mixed>
-
An array containing the data required for a product.
Return values
array<string|int, mixed> —Returns an array of QuickEditProductSpecialPriceListItem or an empty array.