Example #1
0
 protected function processActionDefault()
 {
     $this->getApplication()->setTitle($this->storage->getProxyType()->getTitleForCurrentUser());
     $securityContext = $this->storage->getCurrentUserSecurityContext();
     $this->arParams['STATUS_BIZPROC'] = $this->storage->isEnabledBizProc() && Loader::includeModule("bizproc");
     $gridId = 'folder_list_' . $this->storage->getId();
     $this->processGridActions($gridId);
     $errorsInGridActions = array();
     if ($this->errorCollection->hasErrors()) {
         foreach ($this->getErrors() as $error) {
             /** @var Error $error */
             $errorsInGridActions[] = array('message' => $error->getMessage(), 'code' => $error->getCode());
         }
         $this->errorCollection->clear();
     }
     $proxyType = $this->storage->getProxyType();
     $isGroupStorage = $proxyType instanceof ProxyType\Group;
     $isConnectedGroupStorage = false;
     $groupSharingData = array();
     if ($isGroupStorage) {
         $isConnectedGroupStorage = Sharing::isConnectedToUserStorage($this->getUser()->getId(), $this->storage->getRootObject(), $groupSharingData);
     }
     if ($this->arParams['STATUS_BIZPROC']) {
         $documentData = array('DISK' => array('DOCUMENT_TYPE' => \Bitrix\Disk\BizProcDocument::generateDocumentComplexType($this->storage->getId())), 'WEBDAV' => array('DOCUMENT_TYPE' => \Bitrix\Disk\BizProcDocumentCompatible::generateDocumentComplexType($this->storage->getId())));
         $this->arParams['TEMPLATE_BIZPROC'] = $this->getTemplateBizProc($documentData);
     }
     $this->arResult = array('ERRORS_IN_GRID_ACTIONS' => $errorsInGridActions, 'GRID' => $this->getGridData($gridId), 'IS_BITRIX24' => \Bitrix\Main\ModuleManager::isModuleInstalled('bitrix24'), '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()), 'STORAGE' => array('NETWORK_DRIVE_LINK' => Driver::getInstance()->getUrlManager()->getHostUrl() . $proxyType->getBaseUrlFolderList(), 'ID' => $this->storage->getId(), 'NAME' => $proxyType->getEntityTitle(), 'LINK' => $proxyType->getStorageBaseUrl(), 'LINK_ON_HELP' => $proxyType->getStorageBaseUrl() . 'help', 'ROOT_OBJECT_ID' => $this->storage->getRootObjectId(), 'CAN_CHANGE_RIGHTS_ON_STORAGE' => $this->storage->canChangeRights($securityContext), 'CAN_CHANGE_SETTINGS_ON_STORAGE' => $this->storage->canChangeSettings($securityContext), 'CAN_CHANGE_SETTINGS_ON_BIZPROC' => $this->storage->canCreateWorkflow($securityContext), 'CAN_CHANGE_SETTINGS_ON_BIZPROC_EXCEPT_USER' => $proxyType instanceof ProxyType\User ? false : true, 'SHOW_BIZPROC' => $this->arParams['STATUS_BIZPROC'], 'FOR_SOCNET_GROUP' => $isGroupStorage, 'CONNECTED_SOCNET_GROUP' => $isConnectedGroupStorage, 'CONNECTED_SOCNET_GROUP_OBJECT_ID' => isset($groupSharingData['LINK_OBJECT_ID']) ? $groupSharingData['LINK_OBJECT_ID'] : null), 'BREADCRUMBS' => $this->getBreadcrumbs(), 'BREADCRUMBS_ROOT' => array('NAME' => $proxyType->getTitleForCurrentUser(), 'LINK' => $proxyType->getBaseUrlFolderList(), 'ID' => $this->storage->getRootObjectId()), 'URL_TO_DETACH_OBJECT' => '?action=detachConnectedObject');
     if ($this->arParams['STATUS_BIZPROC']) {
         $this->getAutoloadTemplateBizProc($documentData);
     }
     $this->includeComponentTemplate();
 }