• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/uf/controller.php
  • Класс: BitrixDiskUfController
  • Вызов: Controller::processActionGetBreadcrumbs
protected function processActionGetBreadcrumbs($attachedId)
{
	/** @var AttachedObject $attachedModel */
	$attachedModel = AttachedObject::loadById((int)$attachedId);
	if (!$attachedModel)
	{
		$this->errorCollection[] = new Error('Could not find attached object');
		$this->sendJsonErrorResponse();
	}

	if (!$attachedModel->canRead($this->getUser()->getId()))
	{
		$this->errorCollection[] = new Error('Bad permission. Could not read this file');
		$this->sendJsonErrorResponse();
	}

	$file = $attachedModel->getObject();
	$crumbs = CrumbStorage::getInstance()->getByObject($file);
	$proxyType = $file->getStorage()->getProxyType();
	if ($proxyType instanceof ProxyTypeUser)
	{
		$title = $proxyType->getTitleForCurrentUser();
	}
	else
	{
		$title = $proxyType->getEntityTitle();
	}
	array_unshift($crumbs, $title);

	$this->sendJsonSuccessResponse(array(
		'crumbs' => $crumbs,
	));
}