Bitrix API

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

addRow()

Add single row.

public addRow(array<string|int, mixed> $rowData) : $this
Parameters
$rowData : array<string|int, mixed>
Return values
$this

addRows()

Add multiple rows.

public addRows(array<string|int, mixed> $rows) : $this
Parameters
$rows : array<string|int, mixed>
Return values
$this

clearCache()

Clear inner cache of loaded data.

public clearCache() : $this
Return values
$this

getFields()

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|null

getPropertyValue()

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|null

getTitleFull()

Return title of an offer with all related property names and values.

public getTitleFull(int $rowId) : string
Parameters
$rowId : int
Return values
string

isPropertyPrintable()

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
bool

loadOfferProperties()

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>
Return values
array<string|int, mixed>

        
On this page

Search results