- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/mobile_helper.php
- Класс: \CCrmMobileHelper
- Вызов: CCrmMobileHelper::getProductFilterFields
static function getProductFilterFields()
{
$arSections = array();
$arSections[""] = GetMessage("M_CRM_NOT_SELECTED");
if (CModule::IncludeModule('iblock'))
{
$catalogID = CCrmCatalog::EnsureDefaultExists();
$dbSections = CIBlockSection::GetList(
array('left_margin' => 'asc'),
array(
'IBLOCK_ID' => $catalogID,
//'SECTION_ID' => $activeSectionID,
/*'GLOBAL_ACTIVE' => 'Y',*/
'CHECK_PERMISSIONS' => 'N'
),
false,
array('ID', 'NAME'),
false
);
while ($section = $dbSections->GetNext())
{
$arSections[$section["ID"]] = $section["NAME"];
}
}
$filterFields = array(
array(
"type" => "text",
"id" => "ID",
"name" => GetMessage('CRM_COLUMN_PRODUCT_ID'),
"value" => ""
),
array(
"type" => "text",
"id" => "NAME",
"name" => GetMessage('CRM_COLUMN_PRODUCT_NAME'),
"value" => ""
),
array(
"type" => "select",
"id" => "SECTION_ID",
"name" => GetMessage('CRM_COLUMN_PRODUCT_SECTION'),
"items" => $arSections,
"value" => ""
),
array(
"type" => "checkbox",
"id" => "ACTIVE",
"name" => "",//GetMessage('CRM_COLUMN_PRODUCT_ACTIVE'),
"value" => "",
"items" => array(
"Y" => GetMessage('CRM_COLUMN_PRODUCT_ACTIVE')
),
),
array(
"type" => "text",
"id" => "DESCRIPTION",
"name" => GetMessage('CRM_COLUMN_PRODUCT_DESCRIPTION'),
"value" => ""
),
);
return $filterFields;
}