• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/volume/module/rest.php
  • Класс: BitrixDiskVolumeModuleRest
  • Вызов: Rest::isAllowClearStorage
public function isAllowClearStorage(Storage $storage): bool
{
	static $restStorageId;
	if (empty($restStorageId))
	{
		$storageList = $this->getStorageList();
		if ($storageList[0] instanceof Storage)
		{
			$restStorageId = $storageList[0]->getId();
		}
	}

	// disallow clearance if REST is unavailable
	if ($restStorageId === $storage->getId())
	{
		return $this->isMeasureAvailable();// returns false to prevent fatal error
	}

	return true;
}