• Модуль: lists
  • Путь к файлу: ~/bitrix/modules/lists/lib/entity/iblock.php
  • Класс: BitrixListsEntityIblock
  • Вызов: Iblock::isExist
public function isExist()
{
	$this->param->checkRequiredInputParams(["IBLOCK_TYPE_ID", "IBLOCK_CODE"]);
	if ($this->param->hasErrors())
	{
		$this->errorCollection->add($this->param->getErrors());
		return false;
	}

	$filter = [
		"ID" => $this->params["IBLOCK_ID"] ? $this->params["IBLOCK_ID"] : "",
		"CODE" => $this->params["IBLOCK_CODE"] ?? "",
		"CHECK_PERMISSIONS" => "N",
	];
	$queryObject = CIBlock::getList([], $filter);

	return (bool) $queryObject->fetch();
}