/**
  * @param ServerRequestInterface $request
  */
 protected function initVariables(ServerRequestInterface $request)
 {
     parent::initVariables($request);
     $parameters = $request->getQueryParams();
     $this->bparams = isset($parameters['bparams']) ? $parameters['bparams'] : '';
     // Process bparams
     $pArr = explode('|', $this->bparams);
     $pRteArr = explode(':', $pArr[1]);
     $this->editorNo = $pRteArr[0];
     $this->contentTypo3Language = $pRteArr[1];
     $this->RTEtsConfigParams = $pArr[2];
     if (!$this->editorNo) {
         $this->editorNo = GeneralUtility::_GP('editorNo');
         $this->contentTypo3Language = GeneralUtility::_GP('contentTypo3Language');
         $this->RTEtsConfigParams = GeneralUtility::_GP('RTEtsConfigParams');
     }
     $pArr[1] = implode(':', array($this->editorNo, $this->contentTypo3Language));
     $pArr[2] = $this->RTEtsConfigParams;
     $this->bparams = implode('|', $pArr);
     $this->contentLanguageService->init($this->contentTypo3Language);
     $this->buttonConfig = isset($this->RTEProperties['default.']['buttons.']['link.']) ? $this->RTEProperties['default.']['buttons.']['link.'] : [];
     $RTEtsConfigParts = explode(':', $this->RTEtsConfigParams);
     $RTEsetup = $this->getBackendUser()->getTSConfig('RTE', BackendUtility::getPagesTSconfig($RTEtsConfigParts[5]));
     $this->thisConfig = BackendUtility::RTEsetup($RTEsetup['properties'], $RTEtsConfigParts[0], $RTEtsConfigParts[2], $RTEtsConfigParts[4]);
 }
 /**
  * @param ServerRequestInterface $request
  */
 protected function initVariables(ServerRequestInterface $request)
 {
     parent::initVariables($request);
     $queryParameters = $request->getQueryParams();
     $this->bparams = isset($queryParameters['bparams']) ? $queryParameters['bparams'] : '';
     $this->siteUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
     $currentLinkParts = isset($queryParameters['curUrl']) ? $queryParameters['curUrl'] : [];
     if (isset($currentLinkParts['all'])) {
         $currentLinkParts = GeneralUtility::get_tag_attributes($queryParameters['curUrl']['all']);
         $currentLinkParts['url'] = htmlspecialchars_decode($currentLinkParts['href']);
         unset($currentLinkParts['href']);
     }
     $this->currentLinkParts = $currentLinkParts;
     // Process bparams
     $pArr = explode('|', $this->bparams);
     $pRteArr = explode(':', $pArr[1]);
     $this->editorNo = $pRteArr[0];
     $this->contentTypo3Language = $pRteArr[1];
     $this->RTEtsConfigParams = $pArr[2];
     if (!$this->editorNo) {
         $this->editorNo = GeneralUtility::_GP('editorNo');
         $this->contentTypo3Language = GeneralUtility::_GP('contentTypo3Language');
         $this->RTEtsConfigParams = GeneralUtility::_GP('RTEtsConfigParams');
     }
     $pArr[1] = implode(':', array($this->editorNo, $this->contentTypo3Language));
     $pArr[2] = $this->RTEtsConfigParams;
     $this->bparams = implode('|', $pArr);
     $this->contentLanguageService->init($this->contentTypo3Language);
     $this->buttonConfig = isset($this->RTEProperties['default.']['buttons.']['link.']) ? $this->RTEProperties['default.']['buttons.']['link.'] : [];
     $RTEtsConfigParts = explode(':', $this->RTEtsConfigParams);
     $RTEsetup = $this->getBackendUser()->getTSConfig('RTE', BackendUtility::getPagesTSconfig($RTEtsConfigParts[5]));
     $this->thisConfig = BackendUtility::RTEsetup($RTEsetup['properties'], $RTEtsConfigParts[0], $RTEtsConfigParts[2], $RTEtsConfigParts[4]);
 }
 /**
  * setter for databaseConnection object
  *
  * @param mixed $languageService
  *
  * @return void
  */
 public function setLanguageService($languageService)
 {
     $this->languageService = $languageService instanceof LanguageService ? $languageService : GeneralUtility::makeInstance(LanguageService::class);
     if ($this->getBackendUser()) {
         $this->languageService->init($this->getBackendUser()->uc['lang']);
     }
 }
Exemple #4
0
 /**
  * @param ServerRequestInterface $request
  */
 protected function initVariables(ServerRequestInterface $request)
 {
     parent::initVariables($request);
     $queryParameters = $request->getQueryParams();
     $this->siteUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL');
     $currentLinkParts = isset($queryParameters['curUrl']) ? $queryParameters['curUrl'] : [];
     $this->currentLinkParts = $currentLinkParts;
     $this->editorId = GeneralUtility::_GP('editorId');
     $this->contentsLanguage = GeneralUtility::_GP('contentsLanguage');
     $this->RTEtsConfigParams = GeneralUtility::_GP('RTEtsConfigParams');
     $this->contentLanguageService->init($this->contentsLanguage);
     $RTEtsConfigParts = explode(':', $this->RTEtsConfigParams);
     $RTEsetup = $this->getBackendUser()->getTSConfig('RTE', BackendUtility::getPagesTSconfig($RTEtsConfigParts[5]));
     $this->RTEProperties = $RTEsetup['properties'];
     $this->thisConfig = BackendUtility::RTEsetup($this->RTEProperties, $RTEtsConfigParts[0], $RTEtsConfigParts[2], $RTEtsConfigParts[4]);
     $this->buttonConfig = $this->thisConfig['buttons.']['link.'] ?? [];
 }
 /**
  * Constructor.
  *
  * @return self
  */
 public function __construct()
 {
     $this->language = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Lang\\LanguageService');
     if (is_object($this->getBackendUser())) {
         $languageKey = $this->getBackendUser()->uc['lang'];
     } else {
         $languageKey = $this->getFrontendController()->config['config']['language'];
     }
     $this->language->init($languageKey);
     $this->language->includeLLFile('EXT:commerce/Resources/Private/Language/locallang_ccsv.xml');
 }
 public function __construct()
 {
     $this->lang = GeneralUtility::makeInstance('TYPO3\\CMS\\Lang\\LanguageService');
     $this->lang->init($GLOBALS['BE_USER']->uc['lang']);
 }