Element 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.
- 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
- 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)?
- onPrepareComponentParams() : mixed
- Processing of component parameters.
- 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
stringgetProductsMap()
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
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
boolonPrepareComponentParams()
Processing of component parameters.
public
onPrepareComponentParams(mixed $params) : mixed
Parameters
- $params : mixed
-
Raw component parameters values.
sendJsonAnswer()
Send answer for AJAX request.
public
static sendJsonAnswer([array<string|int, mixed> $result = [] ]) : void
Parameters
- $result : array<string|int, mixed> = []
-
Ajax result.