CoolCMS API

ProductSetMapper extends ApiMapper
in package

FinalYes

Admin mapper that hydrates Api repository data into entities.

Tags
extends

Table of Contents

Properties

$hydrator  : EntityHydrator
$repository  : ProductSetRepository

Methods

__construct()  : mixed
delete()  : Result
deleteAll()  : Result
deletePriceSnapshot()  : array{success: bool, code: string}
Pass-through to the bridge action `.../delete-price-snapshot`.
fetchAvailability()  : array<int, array{availableSets: ?int, inStock: bool, deliveryDays: ?int, labelWarehouseId: ?int, infoText: ?string, attributeClass: ?string, unmappedVariantIds: list, unresolvedSetIds: list}>
Pass-through to the bridge action `.../availability`.
fetchCurrentPrices()  : array<int, array{price: string, originalPrice: string, points: int, fromAmount: int, currencyId: int, vat: string, withVat: bool}>
Pass-through to the bridge action `.../current-prices`. Returns arrays, not entities, so nothing is hydrated (see {@see ProductSetRepository::fetchCurrentPrices()}).
fetchDefaults()  : array{userGroupId: int, currencyId: int, paymentRegionId: int}
Pass-through to the bridge action `.../defaults`.
find()  : T|null
findAll()  : T>, 1: int}
findBy()  : T|null
save()  : Result
savePriceSnapshot()  : array{success: bool, code: string}
Pass-through to the bridge action `.../save-price-snapshot`.
softDelete()  : Result
Pass-through to the bridge action `.../soft-delete`.
updateColumns()  : Result
getEntityClass()  : T>
initalizeEntity()  : ProductSet|null

Properties

Methods

delete()

public delete(int|array<string|int, mixed> $id) : Result
Parameters
$id : int|array<string|int, mixed>
Return values
Result

deleteAll()

public deleteAll([array<string|int, mixed> $filters = [] ]) : Result
Parameters
$filters : array<string|int, mixed> = []
Return values
Result

deletePriceSnapshot()

Pass-through to the bridge action `.../delete-price-snapshot`.

public deletePriceSnapshot(int $id, string $publishedTime) : array{success: bool, code: string}
Parameters
$id : int
$publishedTime : string
Return values
array{success: bool, code: string}

fetchAvailability()

Pass-through to the bridge action `.../availability`.

public fetchAvailability(array<string|int, int> $ids[, int|null $languageId = null ]) : array<int, array{availableSets: ?int, inStock: bool, deliveryDays: ?int, labelWarehouseId: ?int, infoText: ?string, attributeClass: ?string, unmappedVariantIds: list, unresolvedSetIds: list}>
Parameters
$ids : array<string|int, int>
$languageId : int|null = null
Return values
array<int, array{availableSets: ?int, inStock: bool, deliveryDays: ?int, labelWarehouseId: ?int, infoText: ?string, attributeClass: ?string, unmappedVariantIds: list, unresolvedSetIds: list}>

fetchCurrentPrices()

Pass-through to the bridge action `.../current-prices`. Returns arrays, not entities, so nothing is hydrated (see {@see ProductSetRepository::fetchCurrentPrices()}).

public fetchCurrentPrices(array<string|int, int> $ids[, int|null $userGroupId = null ][, int|null $currencyId = null ][, int $amount = 1 ]) : array<int, array{price: string, originalPrice: string, points: int, fromAmount: int, currencyId: int, vat: string, withVat: bool}>
Parameters
$ids : array<string|int, int>
$userGroupId : int|null = null
$currencyId : int|null = null
$amount : int = 1
Return values
array<int, array{price: string, originalPrice: string, points: int, fromAmount: int, currencyId: int, vat: string, withVat: bool}>

fetchDefaults()

Pass-through to the bridge action `.../defaults`.

public fetchDefaults() : array{userGroupId: int, currencyId: int, paymentRegionId: int}
Return values
array{userGroupId: int, currencyId: int, paymentRegionId: int}

find()

public find(int $pageId[, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T|null
Parameters
$pageId : int
$includes : string|array<string|int, mixed> = []
$useCache : bool|null = null
Return values
T|null

findAll()

public findAll([array<string|int, mixed>|null $filters = [] ][, array<string|int, mixed>|null $orderBys = null ][, int|null $offset = null ][, int|null $limit = null ][, array<string|int, mixed>|null $columns = null ][, bool $computeTotalCount = false ][, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T>, 1: int}
Parameters
$filters : array<string|int, mixed>|null = []
$orderBys : array<string|int, mixed>|null = null
$offset : int|null = null
$limit : int|null = null
$columns : array<string|int, mixed>|null = null
$computeTotalCount : bool = false
$includes : string|array<string|int, mixed> = []
$useCache : bool|null = null
Return values
T>, 1: int}

findBy()

public findBy([array<string|int, mixed>|null $filters = [] ][, string|array<string|int, mixed> $includes = [] ][, bool|null $useCache = null ]) : T|null
Parameters
$filters : array<string|int, mixed>|null = []
$includes : string|array<string|int, mixed> = []
$useCache : bool|null = null
Return values
T|null

save()

public save(BaseEntity $entity[, array<string, mixed> $meta = [] ][, array<int, string> $skipFields = [] ]) : Result
Parameters
$entity : BaseEntity
$meta : array<string, mixed> = []
$skipFields : array<int, string> = []
Return values
Result

savePriceSnapshot()

Pass-through to the bridge action `.../save-price-snapshot`.

public savePriceSnapshot(int $id, string|null $publishedTime, array<int, array{fromAmount: int, userGroupId: int, currencyId: int, price: string|float, originalPrice: string|float|null, points: int}> $rows[, string|null $replaceTime = null ]) : array{success: bool, code: string}
Parameters
$id : int
$publishedTime : string|null
$rows : array<int, array{fromAmount: int, userGroupId: int, currencyId: int, price: string|float, originalPrice: string|float|null, points: int}>
$replaceTime : string|null = null
Return values
array{success: bool, code: string}

softDelete()

Pass-through to the bridge action `.../soft-delete`.

public softDelete(int|array<int, int> $id) : Result
Parameters
$id : int|array<int, int>
Return values
Result

updateColumns()

public updateColumns(array<string|int, mixed> $ids, array<string, mixed> $values) : Result
Parameters
$ids : array<string|int, mixed>

ids or composite-id arrays

$values : array<string, mixed>

property name => new value

Return values
Result
On this page

Search results