/**
  * Initialization of the class
  *
  * @return void
  * @todo Define visibility
  */
 public function init()
 {
     // GPvars:
     $this->flags = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('flags');
     $this->data = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('data');
     $this->cmd = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('cmd');
     $this->mirror = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('mirror');
     $this->cacheCmd = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('cacheCmd');
     $this->redirect = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('redirect'));
     $this->prErr = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('prErr');
     $this->_disableRTE = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('_disableRTE');
     $this->CB = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('CB');
     $this->vC = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('vC');
     $this->uPT = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('uPT');
     $this->generalComment = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('generalComment');
     // Creating TCEmain object
     $this->tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
     $this->tce->stripslashes_values = 0;
     $this->tce->generalComment = $this->generalComment;
     // Configuring based on user prefs.
     if ($GLOBALS['BE_USER']->uc['recursiveDelete']) {
         // TRUE if the delete Recursive flag is set.
         $this->tce->deleteTree = 1;
     }
     if ($GLOBALS['BE_USER']->uc['copyLevels']) {
         // Set to number of page-levels to copy.
         $this->tce->copyTree = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($GLOBALS['BE_USER']->uc['copyLevels'], 0, 100);
     }
     if ($GLOBALS['BE_USER']->uc['neverHideAtCopy']) {
         $this->tce->neverHideAtCopy = 1;
     }
     $TCAdefaultOverride = $GLOBALS['BE_USER']->getTSConfigProp('TCAdefaults');
     if (is_array($TCAdefaultOverride)) {
         $this->tce->setDefaultsFromUserTS($TCAdefaultOverride);
     }
     // Reverse order.
     if ($this->flags['reverseOrder']) {
         $this->tce->reverseOrder = 1;
     }
 }
Пример #2
0
 /**
  * Initialization of the class
  *
  * @return void
  */
 public function init()
 {
     $beUser = $this->getBackendUser();
     // GPvars:
     $this->flags = GeneralUtility::_GP('flags');
     $this->data = GeneralUtility::_GP('data');
     $this->cmd = GeneralUtility::_GP('cmd');
     $this->mirror = GeneralUtility::_GP('mirror');
     $this->cacheCmd = GeneralUtility::_GP('cacheCmd');
     $this->redirect = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('redirect'));
     $this->prErr = GeneralUtility::_GP('prErr');
     $this->CB = GeneralUtility::_GP('CB');
     $this->vC = GeneralUtility::_GP('vC');
     $this->uPT = GeneralUtility::_GP('uPT');
     // Creating DataHandler object
     $this->tce = GeneralUtility::makeInstance(DataHandler::class);
     // Configuring based on user prefs.
     if ($beUser->uc['recursiveDelete']) {
         // TRUE if the delete Recursive flag is set.
         $this->tce->deleteTree = 1;
     }
     if ($beUser->uc['copyLevels']) {
         // Set to number of page-levels to copy.
         $this->tce->copyTree = MathUtility::forceIntegerInRange($beUser->uc['copyLevels'], 0, 100);
     }
     if ($beUser->uc['neverHideAtCopy']) {
         $this->tce->neverHideAtCopy = 1;
     }
     $TCAdefaultOverride = $beUser->getTSConfigProp('TCAdefaults');
     if (is_array($TCAdefaultOverride)) {
         $this->tce->setDefaultsFromUserTS($TCAdefaultOverride);
     }
     // Reverse order.
     if ($this->flags['reverseOrder']) {
         $this->tce->reverseOrder = 1;
     }
 }