Documentation

Data format

Data Description Available from version
Description of source for registration
  • SOURCE_ID - identifier, unique within module (required). Contains Latin alphabet characters and numerals. First character - first Latin alphabet letter. Case sensitive.
  • TITLE - name (required)
  • TYPE - type of user filter settings (required). Supports two types:
    • \Bitrix\Landing\Source\Selector::SOURCE_TYPE_COMPONENT - user filter settings form (by default).
    • \Bitrix\Landing\Source\Selector::SOURCE_TYPE_PRESET - preset user filter
  • SETTINGS - array with parameters for user filter settings (required):
    • DETAIL_PAGE (For all types) - optional, type - boolean. When passing false removes the item "Details page" in block settings.
    for TYPE = \Bitrix\Landing\Source\Selector::SOURCE_TYPE_COMPONENT:
    • COMPONENT_NAME => component name (required)
    • COMPONENT_TEMPLATE_NAME => template name (required)
    • COMPONENT_PARAMS => array with component call parameters (required)
    • WRAPPER - array with component settings bitrix:ui.sidepanel.wrapper This is system component, not described in documentation (optional). It launches the filter component. Supported settings:
      • USE_PADDING - false be default
      • PLAIN_VIEW - false be default
      • USE_UI_TOOLBAR - 'N' be default
    for TYPE = \Bitrix\Landing\Source\Selector::SOURCE_TYPE_PRESET:
    • FILTER - array with block filter
  • DATA_SETTINGS - array with available source fields (required)
  • FIELDS - array with source fields for display (numerical). Each element has the following structure:
    • id - field ID
    • name - field name
    • type - node type, necessary for rendering (see [link=10226196]\Bitrix\Landing\Node\Type[/link])
    • additional parameters, necessary for the node (see methods [link=10222564]\Bitrix\Landing\Node::prepareFieldDefinition[/link] и [link=10222540]\Bitrix\Landing\Node::validateFieldDefinition[/link])
  • ORDER - array with source fields for sorting (numerical). Each element has the following structure:
    • id - field ID
    • name - field name
  • DATA_LOADER - full (with indicated namespace) name for loader class (descendant for [link=10222488]\Bitrix\Landing\Source\DataLoader[/link]). обязательный
  • SOURCE_FILTER - additional (customizable) filter for data. Array, optional. For iblocks, for example, must contain iblock ID and access permissions verification keys.

To avoid issues with export, it's not recommended to bind to entity numerical IDs of the current project (for example, iblock12, where 12 is iblock ID). However, you can use the numbers, if such numbers belong to other (your internal) type of numerical sequence.

Block filter Array with integer indexes. Each filter condition is written by the array with such structure (all keys are required):
  • name - filter parameter name (to be displayed in the dynamic bock settings)
  • key - parameter name (field or property for source element property)
  • value - values for filtering. Value format and contents are defined by the source. It's recommended to use the component field format bitrix:main.ui.filter. In this case, you can use:
    • for passing dynamic filter from settings form - JS-library landing.uifilterconverter
    • for showing dynamic filter in the settings form - class \Bitrix\Landing\Source\UiFilterPreset
    • for converting dynamic filter in orm/GetList format - class \Bitrix\Landing\Source\DataFilter
    if another format is selected - all these operations would have to be performed individually.

© «Bitrix24», 2001-2024
Up