\Bitrix\Main\Loader::includeModule('iblock');
$class = \Bitrix\Iblock\Iblock::wakeUp(16)->getEntityDataClass();
$rows =
$class::query()
->setSelect(['ID', 'NAME', 'JOB_TITLE.VALUE'])
->where('ACTIVE', true)
->fetchCollection()
;
/**
* @var \Bitrix\Main\ORM\Objectify\Collection $rows
* @var \Bitrix\Main\ORM\Objectify\EntityObject $row
*/
foreach ($rows as $row) {
$data = $row->collectValues(
\Bitrix\Main\ORM\Objectify\Values::ALL,
\Bitrix\Main\ORM\Fields\FieldTypeMask::ALL,
true
);
/**
* Не очень понятно для чего собирать все значения подряд
*/
$res[] = $data['ID'];
$res[] = $data['NAME'];
$res[] = $data['JOB_TITLE']['VALUE'];
}
...
$GLOBALS['arSectionFilter'] = [];
$request = \Bitrix\Main\Context::getCurrent()->getRequest();
$filterValue = $request->getQuery('filtername');
if ($filterValue) {
$GLOBALS['arSectionFilter'] = [
'UF_CUSTOM_FIELD' => $filterValue
];
}
$APPLICATION->IncludeComponent(
'bitrix:catalog.section.list',
'',
array(
'FILTER_NAME' => 'arSectionFilter',
...
)
)