• Модуль: webdav
  • Путь к файлу: ~/bitrix/modules/webdav/classes/iblock.php
  • Класс: CWebDavIblock
  • Вызов: CWebDavIblock::_get_ib_rights_object
static function _get_ib_rights_object($type, $id, $IBLOCK_ID=null)
{
	if ($type !== 'SECTION' && $type !== 'ELEMENT' && $type !== 'IBLOCK')
		throw new Exception("_get_ib_rights_object invalid type "".htmlspecialcharsbx($type).""");

	$ibRights = null;

	if ($IBLOCK_ID === null && isset($this))
		$IBLOCK_ID = $this->IBLOCK_ID;

	if ($IBLOCK_ID === null)
		throw new Exception("_get_ib_rights_object called statically, but no IBLOCK_ID is set");

	if ($type == 'SECTION')
		$ibRights = new CIBlockSectionRights($IBLOCK_ID, $id);
	elseif ($type == 'ELEMENT')
		$ibRights = new CIBlockElementRights($IBLOCK_ID, $id);
	else
		$ibRights = new CIBlockRights($IBLOCK_ID);

	return $ibRights;
}