QuickEditProductPropertiesRepository
in package
implements
QuickEditProductPropertiesRepositoryInterface
Class QuickEditProductPropertiesRepository
Tags
Interfaces, Classes and Traits
- QuickEditProductPropertiesRepositoryInterface
- Interface QuickEditProductPropertiesRepositoryInterface
Table of Contents
- $length : IntType
- $orderBy : StringType
- $reader : QuickEditProductPropertiesReaderInterface
- $start : IntType
- $writer : QuickEditProductPropertiesWriterInterface
- __construct() : mixed
- QuickEditProductPropertiesRepository constructor.
- getFilteredProductProperties() : array<string|int, mixed>
- Returns product properties based on the provided filter criteria.
- getFilteredProductPropertiesCount() : int
- Returns products that are subject to the specified filter criteria.
- getProductPropertiesCount() : int
- Returns the number of all product properties found.
- paginateProperties() : QuickEditProductPropertiesRepository
- Sets the starting point of the pagination and the number of products.
- setByCombisId() : bool
- Saves product by product-combi ID.
- sortProperties() : QuickEditProductPropertiesRepository
- Sets the sorting order of the product properties.
- _collectionContentArray() : array<string|int, mixed>
- Returns an array of QuickEditProductPropertiesListItem.
Properties
$length
protected
IntType
$length
$orderBy
protected
StringType
$orderBy
$reader
protected
QuickEditProductPropertiesReaderInterface
$reader
$start
protected
IntType
$start
$writer
protected
QuickEditProductPropertiesWriterInterface
$writer
Methods
__construct()
QuickEditProductPropertiesRepository constructor.
public
__construct([QuickEditProductPropertiesReaderInterface|null $reader = null ][, QuickEditProductPropertiesWriterInterface|null $writer = null ]) : mixed
Parameters
- $reader : QuickEditProductPropertiesReaderInterface|null = null
-
Products properties reader.
- $writer : QuickEditProductPropertiesWriterInterface|null = null
-
Products properties writer.
Return values
mixed —getFilteredProductProperties()
Returns product properties based on the provided filter criteria.
public
getFilteredProductProperties(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.
getFilteredProductPropertiesCount()
Returns products that are subject to the specified filter criteria.
public
getFilteredProductPropertiesCount(array<string|int, mixed> $productIds, array<string|int, mixed> $filterParameters) : int
Parameters
- $productIds : array<string|int, mixed>
-
Array containing the selected product IDs to be processed.
- $filterParameters : array<string|int, mixed>
-
Contains the filter parameters.
Return values
int —Returns the number of product properties found.
getProductPropertiesCount()
Returns the number of all product properties found.
public
getProductPropertiesCount() : int
Return values
int —Returns the record number.
paginateProperties()
Sets the starting point of the pagination and the number of products.
public
paginateProperties([IntType|null $start = null ][, IntType|null $length = null ]) : QuickEditProductPropertiesRepository
Parameters
- $start : IntType|null = null
-
Pagination start index.
- $length : IntType|null = null
-
Page length value.
Return values
QuickEditProductPropertiesRepository —QuickEdit products properties repository for chained method calls.
setByCombisId()
Saves product by product-combi ID.
public
setByCombisId(array<string|int, mixed> $productCombi) : bool
Parameters
- $productCombi : array<string|int, mixed>
-
Contains product data to be saved.
Return values
bool —Returns the operation result.
sortProperties()
Sets the sorting order of the product properties.
public
sortProperties([StringType|null $orderBy = null ]) : QuickEditProductPropertiesRepository
Parameters
- $orderBy : StringType|null = null
-
Sorting order (ASC or DESC).
Return values
QuickEditProductPropertiesRepository —QuickEdit products properties repository for chained method calls.
_collectionContentArray()
Returns an array of QuickEditProductPropertiesListItem.
protected
_collectionContentArray(array<string|int, mixed> $properties) : array<string|int, mixed>
Parameters
- $properties : array<string|int, mixed>
-
Array containing property information.
Return values
array<string|int, mixed> —Returns an array of QuickEditProductPropertiesListItem or an empty array.