Documentation

GetMixedList

Attention! This is a public method, but was developed for internal purposes and is strictly not recommended for use.

Description

CIBlockResult
CIBlockSection::GetMixedList(  array arOrder = Array("SORT"=>"ASC"),  array arFilter = Array(), bool bIncCnt = false, array arSelectedFields = false );

Returns list of sections and elements, sorted in in arOrder by filter arFilter. Non-static method.

Returned value

Returns the object [link=90680]CIBlockResult[/link].

See Also

Call parameters

ParameterDescriptionAvailable from version
arOrder Array for sorting, as follows by1=>order1[, by2=>order2 [, ..]], where by1, ... - sorting field with the following values:

for elements:
  • id - element ID;
  • sort - sorting index;
  • timestamp_x - date of edit;
  • name - name;
  • active_from or date_active_from - element active period start;
  • active_to or date_active_to - element active period end;
  • status - element status code in the workflow;
  • code - element symbolic code;
  • iblock_id - iblock numerical identifier;
  • modified_by - modified by ID;
  • active - active element attribute;
  • show_counter - number of element displays (sourced by method CIBlockElement::CounterInc);
  • show_counter_start - time of element's first display (sourced by method CIBlockElement::CounterInc);
  • shows - average number of orders (number of orders / display duration);
  • rand - random sorting;
  • xml_id or external_id - external code;
  • tags - tags;
  • created - time when created;
  • created_date - date when created without time parameters;
  • cnt - number of elements (only with specified grouping);
  • property_<PROPERTY_CODE> - by property value with numerical or symbolic code PROPERTY_CODE (for example, PROPERTY_123 or PROPERTY_NEWS_SOURCE);
  • propertysort_<PROPERTY_CODE> - by sorting index for property value. Only for "List" property type;
  • catalog_<CATALOG_FIELD>_<PRICE_TYPE> - by field CATALOG_FIELD (can be PRICE or CURRENCY) from price with type PRICE_TYPE (for example, catalog_PRICE_1 or CATALOG_CURRENCY_3);
  • CATALOG_QUANTITY - total product quantity;
  • CATALOG_WEIGHT - product weight;
  • CATALOG_AVAILABLE - available for purchase attribute (Y|N). Product is deemed as unavailable if the quantity is less than or equal to zero, stock control is enabled and out-of-stock product purchase is restricted;
  • PROPERTY_<PROPERTY_CODE>.<FIELD> - by element field value, specified as binding. PROPERTY_CODE - property symbolic code as binding to elements. FIELD can have the following values:
    • ID
    • TIMESTAMP_X
    • MODIFIED_BY
    • CREATED
    • CREATED_DATE
    • CREATED_BY
    • IBLOCK_ID
    • ACTIVE
    • ACTIVE_FROM
    • ACTIVE_TO
    • SORT
    • NAME
    • SHOW_COUNTER
    • SHOW_COUNTER_START
    • CODE
    • TAGS
    • XML_ID
    • STATUS
  • PROPERTY_<PROPERTY_CODE>.PROPERTY_<PROPERTY_CODE2> - by element property value specified as binding. PROPERTY_CODE - property symbolic code as binding to elements. PROPERTY_CODE2- property code for bound elements.
  • HAS_PREVIEW_PICTURE and HAS_DETAIL_PICTURE - sorting by available and unavailable images.


for sections:
  • id - group ID;
  • section - parent group ID;
  • name - group name;
  • code - group symbolic code;
  • active - group active status;
  • left_margin - left margin;
  • depth_level - nesting level (starting from 1);
  • sort - sorting index;
  • created - group created time;
  • created_by - by identifier of group creator;
  • modified_by - by identifier of group editor;
  • element_cnt - number of elements in group, works only if bIncCnt = true;
  • timestamp_x - by time of last edit.
order1, ... - sorting order, can have the following values:
  • asc - by ascension;
  • desc - by descension.

Default value for Array("SORT"=>"ASC") indicates that retrieved result will be sorted by ascension. Specifying an empty Array(), result won't be sorted.
arFilter Array("filtered field"=>"value" [, ...]). Filtered field can have the following values:

for elements:
  • ID_1, ID_2 - by numerical code ([link=128054]Number[/link]) from ID_1 to ID_2;
  • ACTIVE - filter by active status (Y|N); passing an empty value ("ACTIVE"=>"") prints all elements without their status ([link=128069]String[/link]);
  • NAME - by name ([link=128080]Mask[/link]);
  • CODE - by symbolic identifier ([link=128080]Mask[/link]);
  • TAGS - by tags ([link=128080]Mask[/link]);
  • EXTERNAL_ID - by external code([link=128080]Mask[/link]);
  • TIMESTAMP_X_1, TIMESTAMP_X_2 - by edit time ([link=128198]Дата[/link]) from TIMESTAMP_X_1 to TIMESTAMP_X_2;
  • DATE_CREATE_1, DATE_CREATE_2 - by creation time ([link=128198]Date[/link]) from DATE_CREATE_1 to DATE_CREATE_2;
  • CREATED_USER_ID or CREATED_BY - by user code who added the element ([link=128054]Число[/link]);
  • DATE_ACTIVE_FROM_1, DATE_ACTIVE_FROM_2 - by start date of active status ([link=128198]Date[/link]) from DATE_ACTIVE_FROM_1 to DATE_ACTIVE_FROM_2. Date format must match with date format, defined by the site.;
  • DATE_ACTIVE_TO_1, DATE_ACTIVE_TO_2 - by end date of active status ([link=128198]Date[/link]) from DATE_ACTIVE_TO_1 to DATE_ACTIVE_TO_2. Date format must match with date format, defined by the site.;
  • IBLOCK_ID - by information block code ([link=128054]Number[/link]);
  • CATALOG_AVAILABLE - available to purchase attribute (Y|N). Product is deemed as unavailable, if its quantity is less than or equal to zero, stock control is enabled and out-of-stock items available for purchase option is restricted;
  • CATALOG_CATALOG_GROUP_ID_N - by price type;
  • CATALOG_SHOP_QUANTITY_N - filtering by quantity range in price;
  • CATALOG_QUANTITY - by total product amount;
  • CATALOG_WEIGHT - by product weight;
  • SHOW_COUNTER - by number of displays ([link=128054]Number[/link]);
  • SHOW_COUNTER_START - by time of first display ([link=128198]Date[/link]);
  • WF_COMMENTS - by workflow comment ([link=128080]Mask[/link]);
  • WF_STATUS_ID or WF_STATUS - by workflow status code ([link=128054]Number[/link]);
  • SHOW_NEW - if SHOW_HISTORY is not specified or isn't 'Y' and SHOW_NEW=Y, then not yet published elements will be displayed jointly with published;
  • PROPERTY_<PROPERTY_CODE> - filter by property values, where PROPERTY_CODE - property code or symbolic code. For properties "List", "Number", "Binding to elements" and "Binding to sections" - [link=128054]Nimber[/link]. For others - [link=128080]Mask[/link];
  • PROPERTY_<PROPERTY_CODE>_VALUE - filter by list values for "list" properties ([link=128080]Mask[/link]); you can search by list string value, not by identifier;
  • CATALOG_<CATALOG_FIELD>_<PRICE_TYPE> - by field CATALOG_FIELD from PRICE_TYPE (price type ID), where CATALOG_FIELD can be: PRICE, CURRENCY.
  • PROPERTY_<PROPERTY_CODE>.<FIELD> - filter by field values for bind elements, where PROPERTY_CODE - ID or symbolic code for binding property, and FIELD - field of element specified in binding.
for sections:
  • IBLOCK_ID - by parent iblock ID;
  • NAME - by name (wildcard [%_] allowed);
  • CODE - by symbolic code (wildcard [%_] allowed);
  • EXTERNAL_ID - by external code (wildcard [%_] allowed);
  • SECTION_ID - by parent section ID;
  • ID_1, ID_2 - by section codes from ID_1 to ID_2;
  • TIMESTAMP_X_1, TIMESTAMP_X_2 - by the last edit time from TIMESTAMP_X_1 to TIMESTAMP_X_2;
  • DATE_CREATE_1, DATE_CREATE_2 - by time of creating from DATE_CREATE_1 to DATE_CREATE_2;
  • MODIFIED_BY - by code of user who updated the section;
  • CREATED_BY - by creator;

Optional. Records aren't filtered by default.
bIncCnt Returns field ELEMENT_CNT - number of elements in section. Additionally, arFilter processes the following filtered fields:
  • ELEMENT_SUBSECTIONS - enables calculation of elements for nested subscriptions (Y|N). Default value: Y;
  • CNT_ALL - considers not yet published elements (Y|N). By default: N. Applicable for installed workflow module;
  • CNT_ACTIVE - considers element active status (Y|N) when calculating. By default: N. Considers ACTIVE element's active flag and start and end date for active status.
Optional parameter, false by default.
arSelectedFields Array for selection. Specified for elements only.

© «Bitrix24», 2001-2024
Up