• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/controller/baseobject.php
  • Класс: BitrixDiskControllerBaseObject
  • Вызов: BaseObject::move
protected function move(DiskBaseObject $object, DiskFolder $toFolder)
{
	$securityContext = $object->getStorage()->getSecurityContext($this->getCurrentUser()->getId());
	if (!$object->canMove($securityContext, $toFolder))
	{
		$this->errorCollection[] = new Error(Loc::getMessage('DISK_ERROR_MESSAGE_DENIED'));

		return;
	}

	$movedObject = $object->moveTo($toFolder, $this->getCurrentUser()->getId(), true);
	if (!$movedObject)
	{
		$this->errorCollection->add($object->getErrors());

		return;
	}

	return $this->get($movedObject);
}