ElementList extends Base
Tags
Table of Contents
Constants
- ACTION_ADD_TO_BASKET = 'ADD2BASKET'
- ACTION_ADD_TO_COMPARE = 'ADD_TO_COMPARE_LIST'
- ACTION_BUY = 'BUY'
- ACTION_DELETE_FROM_COMPARE = 'DELETE_FROM_COMPARE_LIST'
- ACTION_SUBSCRIBE = 'SUBSCRIBE_PRODUCT'
- ERROR_404 = 2
- ERROR_TEXT = 1
- PARAM_TITLE_MASK = '/^[A-Za-z_][A-Za-z01-9_]*$/'
- SORT_ORDER_MASK = '/^(asc|desc|nulls)(,asc|,desc|,nulls)?$/i'
Methods
- __construct() : mixed
- Base constructor.
- applyTemplateModifications() : array<string|int, mixed>
- Returns prepared all component parameters after verify template parameters .
- checkEnlargedData() : void
- Check item properties for enlarge images.
- executeComponent() : int|false
- getAction() : string
- Return current action.
- getDefaultVariantId() : mixed
- getProductsMap() : array<string|int, mixed>
- Returns ids map: SKU_PRODUCT_ID => PRODUCT_ID.
- getSettingsScript() : string
- Return settings script path with modified time postfix.
- getTemplateEmptyPreview() : mixed
- getTemplateSkuPropList() : mixed
- getTemplateVariantsMap() : mixed
- isCacheDisabled() : bool
- Check if cache disabled.
- isEnableCompatible() : bool
- Return state filling old keys in result data. This method makes no sense for the new components.
- isExtendedMode() : bool
- Check if extended mode is enabled.
- isMergeProductWhenAddedBasket() : bool
- Should merge products when adding to the basket (increase the quantity of products)?
- isMultiIblockMode() : bool
- Return if multi iblock mode enabled.
- isPaginationMode() : bool
- Return if pagination mode enabled.
- loadData() : void
- Load component data with use page navigation.
- onPrepareComponentParams() : array<string|int, mixed>
- Returns validated component parameters.
- predictRowVariants() : mixed
- prepareLinks() : void
- Internal method for component ajax - modify urls.
- sendJsonAnswer() : void
- Send answer for AJAX request.
Constants
ACTION_ADD_TO_BASKET
public
mixed
ACTION_ADD_TO_BASKET
= 'ADD2BASKET'
ACTION_ADD_TO_COMPARE
public
mixed
ACTION_ADD_TO_COMPARE
= 'ADD_TO_COMPARE_LIST'
ACTION_BUY
public
mixed
ACTION_BUY
= 'BUY'
ACTION_DELETE_FROM_COMPARE
public
mixed
ACTION_DELETE_FROM_COMPARE
= 'DELETE_FROM_COMPARE_LIST'
ACTION_SUBSCRIBE
public
mixed
ACTION_SUBSCRIBE
= 'SUBSCRIBE_PRODUCT'
ERROR_404
public
mixed
ERROR_404
= 2
ERROR_TEXT
public
mixed
ERROR_TEXT
= 1
PARAM_TITLE_MASK
public
mixed
PARAM_TITLE_MASK
= '/^[A-Za-z_][A-Za-z01-9_]*$/'
SORT_ORDER_MASK
public
mixed
SORT_ORDER_MASK
= '/^(asc|desc|nulls)(,asc|,desc|,nulls)?$/i'
Methods
__construct()
Base constructor.
public
__construct([CBitrixComponent|null $component = null ]) : mixed
Parameters
- $component : CBitrixComponent|null = null
-
Component object if exists.
applyTemplateModifications()
Returns prepared all component parameters after verify template parameters .
public
applyTemplateModifications() : array<string|int, mixed>
Return values
array<string|int, mixed>checkEnlargedData()
Check item properties for enlarge images.
public
static checkEnlargedData(array<string|int, mixed> &$item, string $propertyCode) : void
Parameters
- $item : array<string|int, mixed>
-
Element description.
- $propertyCode : string
-
Image property code.
executeComponent()
public
executeComponent() : int|false
Return values
int|falsegetAction()
Return current action.
public
getAction() : string
Return values
stringgetDefaultVariantId()
public
static getDefaultVariantId() : mixed
getProductsMap()
Returns ids map: SKU_PRODUCT_ID => PRODUCT_ID.
public
static getProductsMap([array<string|int, mixed> $originalIds = array() ]) : array<string|int, mixed>
Parameters
- $originalIds : array<string|int, mixed> = array()
-
Input products ids.
Return values
array<string|int, mixed>getSettingsScript()
Return settings script path with modified time postfix.
public
static getSettingsScript(string $componentPath, string $settingsName) : string
Parameters
- $componentPath : string
-
Path to component.
- $settingsName : string
-
Settings name.
Return values
stringgetTemplateEmptyPreview()
public
getTemplateEmptyPreview() : mixed
getTemplateSkuPropList()
public
getTemplateSkuPropList() : mixed
getTemplateVariantsMap()
public
static getTemplateVariantsMap() : mixed
isCacheDisabled()
Check if cache disabled.
public
isCacheDisabled() : bool
Return values
boolisEnableCompatible()
Return state filling old keys in result data. This method makes no sense for the new components.
public
isEnableCompatible() : bool
Return values
boolisExtendedMode()
Check if extended mode is enabled.
public
isExtendedMode() : bool
Return values
boolisMergeProductWhenAddedBasket()
Should merge products when adding to the basket (increase the quantity of products)?
public
isMergeProductWhenAddedBasket() : bool
If not exists parameter 'USE_MERGE_WHEN_ADD_PRODUCT_TO_BASKET' return true
Return values
boolisMultiIblockMode()
Return if multi iblock mode enabled.
public
isMultiIblockMode() : bool
Return values
boolisPaginationMode()
Return if pagination mode enabled.
public
isPaginationMode() : bool
Return values
boolloadData()
Load component data with use page navigation.
public
loadData() : void
onPrepareComponentParams()
Returns validated component parameters.
public
onPrepareComponentParams(mixed $params) : array<string|int, mixed>
Parameters
- $params : mixed
-
Raw component parameters.
Return values
array<string|int, mixed>predictRowVariants()
public
static predictRowVariants(mixed $lineElementCount, mixed $pageElementCount) : mixed
Parameters
- $lineElementCount : mixed
- $pageElementCount : mixed
prepareLinks()
Internal method for component ajax - modify urls.
public
prepareLinks(array<string|int, mixed> &$data) : void
Parameters
- $data : array<string|int, mixed>
-
Link list.
sendJsonAnswer()
Send answer for AJAX request.
public
static sendJsonAnswer([array<string|int, mixed> $result = [] ]) : void
Parameters
- $result : array<string|int, mixed> = []
-
Ajax result.