protected function processActionDefault() { if (!$this->folder->canRead($this->storage->getCurrentUserSecurityContext()) || !$this->folder->canRestore($this->storage->getCurrentUserSecurityContext())) { $this->showAccessDenied(); return false; } $gridId = 'folder_list'; $this->getApplication()->setTitle($this->storage->getProxyType()->getTitleForCurrentUser()); $this->processGridActions($gridId); $this->arResult = array('GRID' => $this->getGridData($gridId), 'FOLDER' => array('ID' => $this->folder->getId(), 'NAME' => $this->folder->getName(), 'IS_DELETED' => $this->folder->isDeleted(), 'CREATE_TIME' => $this->folder->getCreateTime(), 'UPDATE_TIME' => $this->folder->getUpdateTime()), 'BREADCRUMBS' => $this->getBreadcrumbs(), 'BREADCRUMBS_ROOT' => array('NAME' => Loc::getMessage('DISK_TRASHCAN_NAME'), 'LINK' => CComponentEngine::MakePathFromTemplate($this->arParams['PATH_TO_TRASHCAN_LIST'], array('TRASH_PATH' => '')), 'ID' => $this->storage->getRootObjectId())); $this->includeComponentTemplate(); }
protected function processActionDefault() { $this->arResult = array('FOLDER' => array('ID' => $this->folder->getId(), 'NAME' => $this->folder->getName(), 'IS_DELETED' => $this->folder->isDeleted(), 'CREATE_TIME' => $this->folder->getCreateTime(), 'UPDATE_TIME' => $this->folder->getUpdateTime()), 'BREADCRUMBS' => $this->getBreadcrumbs()); $this->includeComponentTemplate(); }
protected function processActionWithDeleted() { $gridId = 'folder_list'; $this->arResult = array('GRID' => $this->getGridData($gridId, true), 'FOLDER' => array('ID' => $this->folder->getId(), 'NAME' => $this->folder->getName(), 'IS_DELETED' => $this->folder->isDeleted(), 'CREATE_TIME' => $this->folder->getCreateTime(), 'UPDATE_TIME' => $this->folder->getUpdateTime()), 'BREADCRUMBS' => $this->getBreadcrumbs()); $this->includeComponentTemplate(); }
protected function formatFolderToResponse(Folder $folder, $markIsShared = false) { if (empty($folder) || !$folder->getName()) { return array(); } $path = $this->getBreadcrumbs($folder); if (!$path) { return array(); } $result = array('id' => $this->generateId(array('FILE' => false, 'ID' => $folder->getId())), 'isDirectory' => true, 'isShared' => (bool) $markIsShared, 'isSymlinkDirectory' => $folder instanceof \Bitrix\Disk\FolderLink, 'isDeleted' => false, 'storageId' => $this->getStringStorageId(), 'path' => '/' . trim($path, '/'), 'name' => (string) $folder->getName(), 'version' => (string) $this->generateTimestamp($folder->getUpdateTime()->getTimestamp()), 'extra' => array('id' => (string) $folder->getId(), 'iblockId' => (string) $folder->getStorageId(), 'sectionId' => (string) $folder->getParentId(), 'linkSectionId' => (string) ($folder->isLink() ? $folder->getRealObjectId() : ''), 'rootSectionId' => (string) $this->storage->getRootObjectId(), 'name' => (string) $folder->getName()), 'permission' => 'W', 'createdBy' => (string) $folder->getCreatedBy(), 'modifiedBy' => (string) $folder->getUpdatedBy()); if ($this->storage->getRootObjectId() != $folder->getParentId()) { $result['parentId'] = $this->generateId(array('FILE' => false, 'ID' => $folder->getParentId())); } return $result; }
private function getFolderContent(Folder $folder) { return strip_tags($folder->getName()) . "\r\n"; }