Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zetrider/522edf88fcc94e854f63 to your computer and use it in GitHub Desktop.
Save zetrider/522edf88fcc94e854f63 to your computer and use it in GitHub Desktop.
Bitrix - настройка списка окна элементов, привязка к элементам для всех свойств инфоблоков
CModule::IncludeModule("iblock");
$arParams = array();
$res = CIBlock::GetList(array(), array());
while($arF = $res->Fetch())
{
$PROPS = CIBlock::GetProperties($arF['ID'], array('SORT'=>'ASC'), array('PROPERTY_TYPE' => 'E'));
while ($PROP = $PROPS->Fetch())
{
$arParams[] = array(
'd' => 'Y',
'c' => 'list',
'n' => "tbl_iblock_el_search".md5('PROP['.$PROP['ID'].']'),
'v' => array(
'columns' => 'ID,NAME',
'by' => 'name',
'order' => 'asc',
'page_size' => '20',
),
);
}
}
if(count($arParams))
{
CUserOptions::SetOptionsFromArray($arParams);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment