/**
  * Edit action
  *
  * @return void
  */
 public function editAction()
 {
     $this->view->assign('id', $this->id);
     $this->view->assign('depth', $this->depth);
     if (!$this->id) {
         $this->pageInfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
     }
     if ($this->getBackendUser()->workspace != 0) {
         // Adding FlashMessage with the permission setting matrix:
         $this->addFlashMessage(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:WorkspaceWarningText', 'beuser'), LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:WorkspaceWarning', 'beuser'), FlashMessage::WARNING);
     }
     // Get usernames and groupnames
     $beGroupArray = BackendUtility::getListGroupNames('title,uid');
     $beUserArray = BackendUtility::getUserNames();
     // Owner selector
     $beUserDataArray = array(0 => LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:selectNone', 'beuser'));
     foreach ($beUserArray as $uid => &$row) {
         $beUserDataArray[$uid] = $row['username'];
     }
     $beUserDataArray[-1] = LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:selectUnchanged', 'beuser');
     $this->view->assign('currentBeUser', $this->pageInfo['perms_userid']);
     $this->view->assign('beUserData', $beUserDataArray);
     // Group selector
     $beGroupDataArray = array(0 => LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:selectNone', 'beuser'));
     foreach ($beGroupArray as $uid => $row) {
         $beGroupDataArray[$uid] = $row['title'];
     }
     $beGroupDataArray[-1] = LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:selectUnchanged', 'beuser');
     $this->view->assign('currentBeGroup', $this->pageInfo['perms_groupid']);
     $this->view->assign('beGroupData', $beGroupDataArray);
     $this->view->assign('pageInfo', $this->pageInfo);
     $this->view->assign('returnId', $this->returnId);
     $this->view->assign('recursiveSelectOptions', $this->getRecursiveSelectOptions());
 }
 /**
  * Main action for administration
  *
  * @param \GeorgRinger\News\Domain\Model\Dto\AdministrationDemand $demand
  * @dontvalidate  $demand
  * @return void
  */
 public function indexAction(\GeorgRinger\News\Domain\Model\Dto\AdministrationDemand $demand = null)
 {
     $this->redirectToPageOnStart();
     if (is_null($demand)) {
         $demand = $this->objectManager->get(\GeorgRinger\News\Domain\Model\Dto\AdministrationDemand::class);
         // Preselect by TsConfig (e.g. tx_news.module.preselect.topNewsRestriction = 1)
         if (isset($this->tsConfiguration['preselect.']) && is_array($this->tsConfiguration['preselect.'])) {
             unset($this->tsConfiguration['preselect.']['orderByAllowed']);
             foreach ($this->tsConfiguration['preselect.'] as $propertyName => $propertyValue) {
                 ObjectAccess::setProperty($demand, $propertyName, $propertyValue);
             }
         }
         $this->view->assign('hideForm', true);
     }
     $demand = $this->createDemandObject($demand);
     $demand->setActionAndClass(__METHOD__, __CLASS__);
     $categories = $this->categoryRepository->findParentCategoriesByPid($this->pageUid);
     $idList = [];
     foreach ($categories as $c) {
         $idList[] = $c->getUid();
     }
     if (empty($idList) && !$this->getBackendUser()->isAdmin()) {
         $idList = $this->getBackendUser()->getCategoryMountPoints();
     }
     $newsItems = $this->newsRepository->findDemanded($demand, false);
     $assignedValues = ['moduleToken' => $this->getToken(true), 'page' => $this->pageUid, 'demand' => $demand, 'news' => $newsItems, 'showSearchForm' => !is_null($demand) || count($newsItems) > 0, 'categories' => $this->categoryRepository->findTree($idList), 'dateformat' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']];
     $assignedValues = $this->emitActionSignal('AdministrationController', self::SIGNAL_ADMINISTRATION_INDEX_ACTION, $assignedValues);
     $this->view->assignMultiple($assignedValues);
 }
 /**
  * Deactivate a language
  *
  * @param array $data The request data
  * @return void
  */
 public function deactivateLanguageAction(array $data)
 {
     $response = array('success' => false);
     if (!empty($data['locale'])) {
         $response = $this->languageRepository->deactivateByLocale($data['locale']);
     }
     $this->view->assign('response', $response);
 }
 /**
  * @param string $type = 'proposed'
  * @throws \InvalidArgumentException
  */
 public function manageAction($type = 'proposed')
 {
     if (!in_array($type, array_keys(ApiModuleController::$slugClassMap))) {
         throw new \InvalidArgumentException('type parameter must be one of the following: ' . implode(array_keys(ApiModuleController::$slugClassMap)));
     }
     $this->view->assign('manageConfig', json_encode(['updateUrl' => $this->getHref('ApiModule', 'toggle', ['id' => '{id}', 'type' => '{type}'])]));
     $this->view->assign('type', $type);
     $this->view->assign('sessions', $this->getFlatSessionObjects($type));
 }
 /**
  * If the user is in a workspace different than LIVE,
  * we force to show only log entries from the selected workspace,
  * and the workspace selector is not shown.
  *
  * @param \TYPO3\CMS\Belog\Domain\Model\Constraint $constraint
  * @return void
  */
 protected function forceWorkspaceSelectionIfInWorkspace(\TYPO3\CMS\Belog\Domain\Model\Constraint $constraint)
 {
     if ($GLOBALS['BE_USER']->workspace !== 0) {
         $constraint->setWorkspaceUid($GLOBALS['BE_USER']->workspace);
         $this->view->assign('showWorkspaceSelector', false);
     } else {
         $this->view->assign('showWorkspaceSelector', true);
     }
 }
 /**
  * Renders the content of the module.
  *
  * @return void
  */
 public function indexAction()
 {
     // Integrate dynamic JavaScript such as configuration or lables:
     $jsConfiguration = $this->getJavaScriptConfiguration();
     $this->view->getModuleTemplate()->getPageRenderer()->addInlineSettingArray('Recycler', $jsConfiguration);
     $this->view->getModuleTemplate()->getPageRenderer()->addInlineLanguageLabelFile('EXT:recycler/Resources/Private/Language/locallang.xlf');
     $this->view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation($this->pageRecord);
     $this->view->assign('title', $this->getLanguageService()->getLL('title'));
     $this->view->assign('allowDelete', $this->allowDelete);
 }
 /**
  * Shows documents to be downloaded/fetched from a remote location.
  *
  * @return void
  */
 public function downloadAction()
 {
     // This action is reserved for admin users. Redirect to default view if not.
     if (!$this->getBackendUser()->isAdmin()) {
         $this->redirect('list');
     }
     // Retrieve the list of official documents
     $documents = $this->documentationService->getOfficialDocuments();
     // Merge with the list of local extensions
     $extensions = $this->documentationService->getLocalExtensions();
     $allDocuments = array_merge($documents, $extensions);
     $this->view->assign('documents', $allDocuments);
 }
 /**
  * Overview
  *
  * @return void
  */
 public function indexAction()
 {
     $this->view->assign('reports', $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']);
     $this->saveState();
 }
Beispiel #9
0
 /**
  * Search for files by name and pass them with a facade to fluid
  *
  * @param string $searchWord
  */
 public function searchAction($searchWord = '')
 {
     if (empty($searchWord)) {
         $this->forward('index');
     }
     $fileFacades = [];
     $files = $this->fileRepository->searchByName($this->folderObject, $searchWord);
     if (empty($files)) {
         $this->controllerContext->getFlashMessageQueue('core.template.flashMessages')->addMessage(new FlashMessage(LocalizationUtility::translate('flashmessage.no_results', 'filelist'), '', FlashMessage::INFO));
     } else {
         foreach ($files as $file) {
             $fileFacades[] = new \TYPO3\CMS\Filelist\FileFacade($file);
         }
     }
     $pageRenderer = $this->view->getModuleTemplate()->getPageRenderer();
     $pageRenderer->loadRequireJsModule('TYPO3/CMS/Filelist/FileList');
     $this->view->assign('searchWord', $searchWord);
     $this->view->assign('files', $fileFacades);
     $this->view->assign('veriCode', $this->getBackendUser()->veriCode());
     $this->view->assign('deleteUrl', BackendUtility::getModuleUrl('tce_file'));
     $this->view->assign('settings', ['jsConfirmationDelete' => $this->getBackendUser()->jsConfirmation(JsConfirmation::DELETE)]);
     $pageRenderer->loadRequireJsModule('TYPO3/CMS/Filelist/FileDelete');
     $pageRenderer->addInlineLanguageLabelFile('EXT:lang/Resources/Private/Language/locallang_alt_doc.xlf', 'buttons');
 }
Beispiel #10
0
 /**
  * Statistics for external documents
  *
  * @return void
  */
 public function externalDocumentsAction()
 {
     $this->view->assign('records', $this->administrationRepository->getExternalDocumentsStatistic());
 }
 /**
  * Search for files by name and pass them with a facade to fluid
  *
  * @param string $searchWord
  */
 public function searchAction($searchWord = '')
 {
     if (empty($searchWord)) {
         $this->forward('index');
     }
     $fileFacades = [];
     $files = $this->fileRepository->searchByName($this->folderObject, $searchWord);
     if (empty($files)) {
         $this->controllerContext->getFlashMessageQueue('core.template.flashMessages')->addMessage(new FlashMessage(LocalizationUtility::translate('flashmessage.no_results', 'filelist'), '', FlashMessage::INFO));
     } else {
         foreach ($files as $file) {
             $fileFacades[] = new \TYPO3\CMS\Filelist\FileFacade($file);
         }
     }
     $this->view->assign('searchWord', $searchWord);
     $this->view->assign('files', $fileFacades);
     $this->view->assign('settings', ['jsConfirmationDelete' => $this->getBackendUser()->jsConfirmation(JsConfirmation::DELETE)]);
 }
 /**
  * Show selected page from pagetree in iframe
  *
  * @return void
  */
 public function showAction()
 {
     $this->view->assign('widths', $this->getPreviewFrameWidths());
     $this->view->assign('url', $this->getTargetUrl());
     $this->view->assign('languages', $this->getPreviewLanguages());
 }