Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 /**
  * Runs index by folder.
  * @param Folder $folder Target folder.
  * @throws \Bitrix\Main\LoaderException
  * @return void
  */
 public function indexFolder(Folder $folder)
 {
     if (!Loader::includeModule('search')) {
         return;
     }
     //here we place configuration by Module (Options). Example, we can deactivate index for big files in Disk.
     if (!Configuration::allowIndexFiles()) {
         return;
     }
     $storage = $folder->getStorage();
     if (!$storage) {
         return;
     }
     if (!$storage->getProxyType()->canIndexBySearch()) {
         return;
     }
     $searchData = array('LAST_MODIFIED' => $folder->getUpdateTime() ?: $folder->getCreateTime(), 'TITLE' => $folder->getName(), 'PARAM1' => $folder->getStorageId(), 'PARAM2' => $folder->getParentId(), 'SITE_ID' => $storage->getSiteId() ?: SITE_ID, 'URL' => $this->getDetailUrl($folder), 'PERMISSIONS' => $this->getSimpleRights($folder), 'BODY' => $this->getFolderContent($folder));
     if ($storage->getProxyType() instanceof Group) {
         $searchData['PARAMS'] = array('socnet_group' => $storage->getEntityId(), 'entity' => 'socnet_group');
     }
     /** @noinspection PhpDynamicAsStaticMethodCallInspection */
     CSearch::index(Driver::INTERNAL_MODULE_ID, $this->getItemId($folder), $searchData, true);
 }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 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();
 }