Bitrix Site Manager

CIBlockType::GetList

CDBResult
CIBlockType::GetList(
 array arOrder = Array("SORT"=>"ASC"),
 array arFilter = Array()
);

Returns a sorted and filtered list of information block types.

Parameters

ParameterDescription
arOrder Array of the fields for sorting. Contains pairs "sorting field"=>"sorting direction". The sorting field can be one of the following:
  • id - type ID;
  • sort - sort weight.
arFilter An array of the format Array("filtering field"=>"value" [, ...]). The filtering field can be the following:
  • ID - by the type ID.
Optional. By default, fields are not sorted.

Return Values

Returns an instance of CDBResult

See Also

  • CDBResult
  • Information block type fields

    Example


    <?
    $db_iblock_type = CIBlockType::GetList();
    while($ar_iblock_type = $db_iblock_type->Fetch())
    {
       if($arIBType = CIBlockType::GetByIDLang($ar_iblock_type["ID"], LANG))
       {
          echo htmlspecialcharsex($arIBType["NAME"])."<br>";
       }   
    }
    ?>