Пример #1
0
 /**
  * Initialize the view
  *
  * @param ViewInterface $view The view
  * @return void
  */
 public function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     $this->registerDocheaderButtons();
     $view->assign('copyright', BackendUtility::TYPO3_copyRightNotice());
 }
 /**
  * Initializes the module view.
  *
  * @param ViewInterface $view The view
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     $extPath = $this->getRelativeExtensionPath() . 'Resources/Public/CSS/';
     // Skip, if view is initialized in non-backend context
     if (!$view instanceof BackendTemplateView) {
         return;
     }
     parent::initializeView($view);
     if ($this->actionMethodName === 'indexAction') {
         $view->getModuleTemplate()->getPageRenderer()->addCssFile($extPath . 'fullcalendar.min.css');
         $view->getModuleTemplate()->getPageRenderer()->addCssFile($extPath . 'scheduler.min.css');
         $view->getModuleTemplate()->getPageRenderer()->addCssFile($extPath . 'index.css');
         $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Sessions/Contrib/fullcalendar');
         $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Sessions/Contrib/scheduler');
         $view->getModuleTemplate()->getPageRenderer()->addRequireJsConfiguration(['paths' => ['sightglass' => $this->getRelativeExtensionPath() . 'Resources/Public/JavaScript/Contrib/sightglass'], 'shim' => ['TYPO3/CMS/Sessions/Contrib/scheduler' => ['deps' => ['TYPO3/CMS/Sessions/Contrib/fullcalendar']], 'TYPO3/CMS/Sessions/Contrib/rivets' => ['deps' => ['sightglass']]]]);
     }
     if ($this->actionMethodName === 'manageAction') {
         $view->getModuleTemplate()->getPageRenderer()->addCssFile($extPath . 'manage.css');
         $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Sessions/Contrib/uri-templates');
     }
     if (!in_array($this->actionMethodName, $this->actionsWithoutMenu)) {
         $this->generateModuleMenu();
         $this->generateModuleButtons();
     }
 }
 /**
  * Initializes the view before invoking an action method.
  *
  * Override this method to solve assign variables common for all actions
  * or prepare the view in another way before the action is called.
  *
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized
  * @return void
  * @api
  */
 protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     $this->contentObject = $this->configurationManager->getContentObject();
     $this->contentObjectData = $this->contentObject->data;
     $this->data['parent'] = $this->contentObjectData;
     $view->assign('data', $this->data);
     if ($this->settings['region']['htmlTag_langKey']) {
         $this->region = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('_', $this->settings['region']['htmlTag_langKey']);
         $this->region = $this->region[1];
     } else {
         $this->region = $this->settings['region']['default'];
     }
     $view->assign('region', $this->region);
     parent::initializeView($view);
     if (count($this->settings['javascript']['load']) > 0) {
         foreach ($this->settings['javascript']['load'] as $key => $value) {
             if ($value['enable']) {
                 $src = $value['src'];
                 if ($key == 'googleMapsApi') {
                     $src .= '&language=' . ($this->settings['region']['htmlTag_langKey'] ? $this->settings['region']['htmlTag_langKey'] : $this->settings['region']['default']);
                 }
                 if ($key == 'googleMapsApi' && '' != $this->settings['general']['google']['apikey']) {
                     $src .= '&key=' . $this->settings['general']['google']['apikey'];
                 }
                 $this->response->addAdditionalHeaderData($this->wrapJavascriptFile($src));
             }
         }
     }
 }
Пример #4
0
 /**
  * Initializes the module view.
  *
  * @param ViewInterface $view The view
  * @return void
  *
  * @throws
  */
 protected function initializeView(ViewInterface $view)
 {
     // Skip, if view is initialized in non-backend context
     if ($view instanceof TemplateView) {
         parent::initializeView($view);
     }
 }
Пример #5
0
 /**
  * Set up the doc header properly here
  *
  * @param ViewInterface $view
  */
 protected function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     // Disable Path
     $view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation([]);
 }
Пример #6
0
 /**
  * Set up the doc header properly here
  *
  * @param ViewInterface $view
  */
 protected function initializeView(ViewInterface $view)
 {
     if ($view instanceof BackendTemplateView) {
         /** @var BackendTemplateView $view */
         parent::initializeView($view);
         $view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation([]);
         $uriBuilder = $this->objectManager->get(UriBuilder::class);
         $uriBuilder->setRequest($this->request);
         $this->view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Documentation/Main');
         $menu = $this->view->getModuleTemplate()->getDocHeaderComponent()->getMenuRegistry()->makeMenu();
         $menu->setIdentifier('DocumentationModuleMenu');
         $isListActive = $this->request->getControllerActionName() === 'list' ? true : false;
         $uri = $uriBuilder->reset()->uriFor('list', array(), 'Document');
         $listMenuItem = $menu->makeMenuItem()->setTitle($this->getLanguageService()->sL('LLL:EXT:documentation/Resources/Private/Language/locallang.xlf:showDocumentation'))->setHref($uri)->setActive($isListActive);
         $menu->addMenuItem($listMenuItem);
         if ($this->getBackendUser()->isAdmin()) {
             $isDownloadActive = $this->request->getControllerActionName() === 'download' ? true : false;
             $uri = $uriBuilder->reset()->uriFor('download', array(), 'Document');
             $downloadMenuItem = $menu->makeMenuItem()->setTitle($this->getLanguageService()->sL('LLL:EXT:documentation/Resources/Private/Language/locallang.xlf:downloadDocumentation'))->setHref($uri)->setActive($isDownloadActive);
             $menu->addMenuItem($downloadMenuItem);
         }
         $this->view->getModuleTemplate()->getDocHeaderComponent()->getMenuRegistry()->addMenu($menu);
         $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
     }
 }
Пример #7
0
 /**
  * Set up the doc header properly here
  *
  * @param ViewInterface $view
  */
 protected function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     // Disable Path
     $view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation([]);
     $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/EqualHeight');
 }
 /**
  * Initializes the view before invoking an action method.
  * Override this method to solve assign variables common for all actions
  * or prepare the view in another way before the action is called.
  * 
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized
  * @return void
  */
 protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     $cObjData = $this->configurationManager->getContentObject()->data;
     $view->assign('newsItem', $cObjData);
     //$view->assign('contentObjectData', $this->configurationManager->getContentObject()->data);
     $view->assign('emConfiguration', EmConfiguration::getSettings());
     parent::initializeView($view);
 }
Пример #9
0
 /**
  * Initialize the view
  *
  * @param ViewInterface $view The view
  *
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     $view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation([]);
     $this->generateMenu();
     $this->generateButtons();
 }
Пример #10
0
 /**
  * Set up the doc header properly here
  *
  * @param ViewInterface $view
  */
 protected function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     $permissionClause = $this->getBackendUserAuthentication()->getPagePermsClause(1);
     $pageRecord = BackendUtility::readPageAccess($this->pageUid, $permissionClause);
     $view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation($pageRecord);
     $this->generateMenu();
 }
 /**
  * Set up the doc header properly here
  *
  * @param ViewInterface $view
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     if ($this->actionMethodName == 'indexAction' || $this->actionMethodName == 'onlineAction' || $this->actionMethodName == 'compareAction') {
         $this->generateMenu();
         $this->registerDocheaderButtons();
     }
 }
 /**
  * Set up the doc header properly here
  *
  * @param ViewInterface $view
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     if ($this->actionMethodName == 'indexAction' || $this->actionMethodName == 'onlineAction' || $this->actionMethodName == 'compareAction') {
         $this->generateMenu();
         $this->registerDocheaderButtons();
         $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
     }
 }
 /**
  * initialize view
  */
 public function initializeView(ViewInterface $view)
 {
     parent::initializeView($view);
     if ($this->getBackendUser()) {
         $lang = $this->getBackendUser()->uc['lang'] ?: 'en';
         $locale = $lang . '_' . strtoupper($lang);
         setlocale(LC_ALL, $lang, $locale, $locale . '.utf8', $this->getBackendUser()->uc['lang'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLocale']);
         $view->assign('locale', $locale);
     }
 }
Пример #14
0
 /**
  * initialize the view.
  * Just call the parent. And assign the configurationManager.
  * Afterwards you can register some custom template functions/modifiers.
  *
  * @see http://www.smarty.net/docs/en/api.register.plugin.tpl
  */
 protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     parent::initializeView($view);
     if ($view instanceof \Vierwd\VierwdSmarty\View\SmartyView) {
         $view->setContentObject($this->configurationManager->getContentObject());
     }
     // set template root paths, if available
     if (isset($this->settings['templateRootPaths'])) {
         $this->view->setTemplateRootPaths($this->settings['templateRootPaths']);
     }
     // $view->Smarty->registerPlugin('function', 'categorylink', array($this, 'smarty_categorylink'));
 }
Пример #15
0
 /**
  * Set up the doc header properly here
  *
  * @param ViewInterface $view
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     if ($this->actionMethodName == 'indexAction' || $this->actionMethodName == 'onlineAction' || $this->actionMethodName == 'compareAction') {
         $this->generateMenu();
         $this->registerDocheaderButtons();
         $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
     }
     if ($view instanceof BackendTemplateView) {
         $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/Modal');
     }
 }
Пример #16
0
 /**
  * Initialize the view
  *
  * @param ViewInterface $view The view
  * @return void
  */
 public function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     $this->registerDocheaderButtons();
 }
Пример #17
0
 /**
  * Initialize the view
  *
  * @param ViewInterface $view The view
  * @return void
  */
 public function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     $this->registerDocheaderButtons();
     $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
 }
Пример #18
0
 /**
  * Initialize the view
  *
  * @param ViewInterface $view The view
  * @return void
  */
 public function initializeView(ViewInterface $view)
 {
     /** @var BackendTemplateView $view */
     parent::initializeView($view);
     $pageRenderer = $this->view->getModuleTemplate()->getPageRenderer();
     $pageRenderer->loadRequireJsModule('TYPO3/CMS/Filelist/FileListLocalisation');
     $pageRenderer->loadRequireJsModule('TYPO3/CMS/Filelist/FileSearch');
     $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
     $this->registerDocHeaderButtons();
 }
 /**
  * Initializes the view before invoking an action method.
  *
  * Override this method to solve assign variables common for all actions
  * or prepare the view in another way before the action is called.
  *
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
  * @return void
  */
 protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     parent::initializeView($view);
     $this->view->assignMultiple(array('controllerSettings' => $this->controllerSettings, 'actionSettings' => $this->actionSettings, 'extConf' => $this->extConf, 'currentPageUid' => $this->currentPageUid, 'dateTime' => $this->dateTime));
 }
Пример #20
0
 /**
  * Initializes the view before invoking an action method.
  * Add content object data to view
  *
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized
  * @return void
  */
 protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     $view->assign('contentObjectData', $this->configurationManager->getContentObject()->data);
     parent::initializeView($view);
 }
 /**
  * @param ViewInterface $view
  */
 protected function initializeView(ViewInterface $view)
 {
     parent::initializeView($view);
 }
Пример #22
0
 /**
  * Initializes the view before invoking an action method.
  *
  * Override this method to solve assign variables common for all actions
  * or prepare the view in another way before the action is called.
  *
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
  *
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     parent::initializeView($view);
     $this->view->assignMultiple(['controllerSettings' => $this->controllerSettings, 'actionSettings' => $this->actionSettings, 'extConf' => $this->extConf, 'currentPageUid' => $this->currentPageUid, 'dateTime' => $this->dateTime]);
 }
Пример #23
0
 /**
  * Initialize the view
  *
  * @param ViewInterface $view The view
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     if ($view instanceof BackendTemplateView) {
         parent::initializeView($view);
         $view->getModuleTemplate()->getPageRenderer()->loadExtJS();
         $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/DateTimePicker');
     }
 }
Пример #24
0
 /**
  * Initialize view
  *
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
  */
 protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     /** @var \TYPO3\CMS\Backend\View\BackendTemplateView $view */
     parent::initializeView($view);
     $view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation([]);
     $pageRenderer = $this->view->getModuleTemplate()->getPageRenderer();
     $pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
     $this->createMenu();
 }
Пример #25
0
 /**
  * Initializes view
  *
  * @param ViewInterface $view The view to be initialized
  * @return void
  */
 protected function initializeView(ViewInterface $view)
 {
     parent::initializeView($view);
     $view->assign('previewUrl', BackendUtility::viewonclick($this->pageInfo['uid'], '', BackendUtility::BEgetRootLine($this->pageInfo['uid'])));
     // the view of the update action has a different view class
     if ($view instanceof BackendTemplateView) {
         $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Beuser/Permissions');
         $view->getModuleTemplate()->addJavaScriptCode('jumpToUrl', '
             function jumpToUrl(URL) {
                 window.location.href = URL;
                 return false;
             }
             ');
         $this->registerDocHeaderButtons();
         $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
     }
 }
Пример #26
0
 /**
  * Makes the data object in fluid accessible
  *
  * @param \TYPO3\CMS\Extbase\Mvc\ViewInterface $view
  * @return void
  */
 protected function initializeView($view)
 {
     parent::initializeView($view);
     $view->assign('data', $this->configurationManager->getContentObject()->data);
 }