ProductLoader
Table of Contents
Methods
- __construct() : mixed
- addRow() : $this
- Add single row.
- addRows() : $this
- Add multiple rows.
- clearCache() : $this
- Clear inner cache of loaded data.
- getFields() : array<string|int, mixed>
- Return fields for $provider.
- getIblockValue() : mixed|null
- Return base field value with $code from iblock for $rowId.
- getPropertyValue() : mixed|null
- Return prepared for printing property value with $code for row with $rowId.
- getTitleFull() : string
- Return title of an offer with all related property names and values.
- isPropertyPrintable() : bool
- Return true if $property can be printed in a document.
- loadOfferProperties() : array<string|int, mixed>
- Return properties data for offers iblock.
- loadProductProperties() : array<string|int, mixed>
- Return properties data for products iblock.
Methods
__construct()
public
__construct() : mixed
addRow()
Add single row.
public
addRow(array<string|int, mixed> $rowData) : $this
Parameters
- $rowData : array<string|int, mixed>
Return values
$thisaddRows()
Add multiple rows.
public
addRows(array<string|int, mixed> $rows) : $this
Parameters
- $rows : array<string|int, mixed>
Return values
$thisclearCache()
Clear inner cache of loaded data.
public
clearCache() : $this
Return values
$thisgetFields()
Return fields for $provider.
public
getFields(Product $provider) : array<string|int, mixed>
Parameters
- $provider : Product
Return values
array<string|int, mixed>getIblockValue()
Return base field value with $code from iblock for $rowId.
public
getIblockValue(string $code, int $rowId) : mixed|null
Parameters
- $code : string
-
- name of the field.
- $rowId : int
-
- id of the row.
Return values
mixed|nullgetPropertyValue()
Return prepared for printing property value with $code for row with $rowId.
public
getPropertyValue(mixed $code, int $rowId) : mixed|null
Parameters
- $code : mixed
-
- code of the field related to property. It could be like "PROPERTY_111" or "PROPERTY_MY_CODE" or "PROPERTY_111_IMAGE" for directory image properties.
- $rowId : int
Return values
mixed|nullgetTitleFull()
Return title of an offer with all related property names and values.
public
getTitleFull(int $rowId) : string
Parameters
- $rowId : int
Return values
stringisPropertyPrintable()
Return true if $property can be printed in a document.
public
isPropertyPrintable(array<string|int, mixed> $property) : bool
Parameters
- $property : array<string|int, mixed>
Return values
boolloadOfferProperties()
Return properties data for offers iblock.
public
loadOfferProperties() : array<string|int, mixed>
Return values
array<string|int, mixed>loadProductProperties()
Return properties data for products iblock.
public
loadProductProperties() : array<string|int, mixed>