• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/internals/diskcomponent.php
  • Класс: BitrixDiskInternalsDiskComponent
  • Вызов: DiskComponent::initializeStorage
protected function initializeStorage()
{
	if(isset($this->arParams['STORAGE']))
	{
		$this->storage = $this->arParams['STORAGE'];

		return $this;
	}
	elseif(isset($this->arParams['STORAGE_ID']))
	{
		$this->storage = Storage::loadById($this->arParams['STORAGE_ID']);
	}
	else
	{
		$this->storage = Storage::load(array(
			'MODULE_ID' => $this->arParams['STORAGE_MODULE_ID'],
			'ENTITY_TYPE' => $this->arParams['STORAGE_ENTITY_TYPE'],
			'ENTITY_ID' => $this->arParams['STORAGE_ENTITY_ID'],
		));
	}
	return $this;
}