• Модуль: search
  • Путь к файлу: ~/bitrix/modules/search/classes/general/comp_parameters.php
  • Класс: CSearchParameters
  • Вызов: CSearchParameters::GetFilterDropDown
static function GetFilterDropDown($bFilter = false)
{
	if ($bFilter)
		$arrDropdown = array(
			"no" => GetMessage("SEARCH_CP_NO_LIMIT"),
			"main" => "[main] ".GetMessage("SEARCH_CP_STATIC"),
		);
	else
		$arrDropdown = array();

	if (IsModuleInstalled("forum"))
		$arrDropdown["forum"] = "[forum] ".GetMessage("SEARCH_CP_FORUM");

	if (CModule::IncludeModule("iblock"))
	{
		$rsType = CIBlockType::GetList(array("sort" => "asc"), array("ACTIVE" => "Y"));
		while ($arr = $rsType->Fetch())
		{
			if ($ar = CIBlockType::GetByIDLang($arr["ID"], LANGUAGE_ID))
				$arrDropdown["iblock_".$arr["ID"]] = "[iblock_".$arr["ID"]."] ".$ar["~NAME"];
		}
	}

	if (IsModuleInstalled("blog"))
	{
		$arrDropdown["blog"] = "[blog] ".GetMessage("SEARCH_CP_BLOG");
		if ($bFilter)
			$arrDropdown["microblog"] = "[microblog] ".GetMessage("SEARCH_CP_MICROBLOG");
	}

	if (IsModuleInstalled("socialnetwork"))
	{
		$arrDropdown["socialnetwork"] = "[socialnetwork] ".GetMessage("SEARCH_CP_SOCNET");
		$arrDropdown["socialnetwork_user"] = "[socialnetwork_user] ".GetMessage("SEARCH_CP_SOCNET_USER");
	}

	if (IsModuleInstalled("intranet"))
	{
		$arrDropdown["intranet"] = "[intranet] ".GetMessage("SEARCH_CP_INTRANET_USERS");
	}

	if (IsModuleInstalled("crm"))
	{
		$arrDropdown["crm"] = "[crm] ".GetMessage("SEARCH_CP_CRM");
	}

	if (IsModuleInstalled("disk"))
	{
		$arrDropdown["disk"] = "[disk] ".GetMessage("SEARCH_CP_DISK");
	}

	return $arrDropdown;
}