Esempio n. 1
0
 /**
  * Constructs this view
  *
  * Defines the global variable SOBE. Normally this is used by the wizards
  * which are one file only. This view is now the class with the global
  * variable name SOBE.
  *
  * Defines the document template object.
  *
  * @param \TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository
  * @see \TYPO3\CMS\Backend\Template\DocumentTemplate
  */
 public function __construct(\TYPO3\CMS\Form\Domain\Repository\ContentRepository $repository)
 {
     parent::__construct($repository);
     $GLOBALS['SOBE'] = $this;
     // Define the document template object
     $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->setModuleTemplate('EXT:form/Resources/Private/Templates/Wizard.html');
     $this->pageRenderer = $this->doc->getPageRenderer();
     $this->pageRenderer->enableConcatenateFiles();
     $this->pageRenderer->enableCompressCss();
     $this->pageRenderer->enableCompressJavascript();
 }
Esempio n. 2
0
 /**
  * Initializes the page renderer object
  */
 protected function initPageRenderer()
 {
     if ($this->pageRenderer !== null) {
         return;
     }
     $this->pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
     $this->pageRenderer->setLanguage($GLOBALS['LANG']->lang);
     $this->pageRenderer->enableConcatenateFiles();
     $this->pageRenderer->enableCompressCss();
     $this->pageRenderer->enableCompressJavascript();
     // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
     foreach ($this->jsFilesNoConcatenation as $file) {
         $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file, 'text/javascript', true, false, '', true);
     }
     // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
     foreach ($this->jsFiles as $file) {
         $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file);
     }
     if ((int) $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1) {
         $this->pageRenderer->enableDebugMode();
     }
 }
Esempio n. 3
0
 /**
  * Gets instance of PageRenderer configured with the current language, file references and debug settings
  *
  * @return \TYPO3\CMS\Core\Page\PageRenderer
  */
 public function getPageRenderer()
 {
     if (!isset($this->pageRenderer)) {
         $this->pageRenderer = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Page\\PageRenderer');
         $this->pageRenderer->setLanguage($GLOBALS['LANG']->lang);
         $this->pageRenderer->addCssLibrary($GLOBALS['BACK_PATH'] . 'contrib/normalize/normalize.css', 'stylesheet', 'all', '', TRUE, TRUE);
         $this->pageRenderer->enableConcatenateFiles();
         $this->pageRenderer->enableCompressCss();
         $this->pageRenderer->enableCompressJavascript();
         // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
         foreach ($this->jsFilesNoConcatenation as $file) {
             $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file, 'text/javascript', TRUE, FALSE, '', TRUE);
         }
         // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
         foreach ($this->jsFiles as $file) {
             $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file);
         }
     }
     if ((int) $GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1) {
         $this->pageRenderer->enableDebugMode();
     }
     return $this->pageRenderer;
 }
Esempio n. 4
0
 /**
  * Gets instance of PageRenderer configured with the current language, file references and debug settings
  *
  * @return \TYPO3\CMS\Core\Page\PageRenderer
  */
 public function getPageRenderer()
 {
     if (!isset($this->pageRenderer)) {
         $this->pageRenderer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Page\\PageRenderer');
         $this->pageRenderer->setTemplateFile(TYPO3_mainDir . 'templates/template_page_backend.html');
         $this->pageRenderer->setLanguage($GLOBALS['LANG']->lang);
         $this->pageRenderer->enableConcatenateFiles();
         $this->pageRenderer->enableCompressCss();
         $this->pageRenderer->enableCompressJavascript();
         // Add all JavaScript files defined in $this->jsFiles to the PageRenderer
         foreach ($this->jsFiles as $file) {
             $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file);
         }
     }
     if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['debug']) === 1) {
         $this->pageRenderer->enableDebugMode();
     }
     return $this->pageRenderer;
 }