/**
  * Creates an isntance of this class.
  */
 public function __construct()
 {
     $this->apiWrapper = tx_realurl_apiwrapper::getInstance();
     $urlParameters = $this->apiWrapper->array_merge_recursive_overrule($_GET, $_POST);
     $this->currentPage = max(1, intval($urlParameters['page']));
     unset($urlParameters['page']);
     unset($urlParameters['cmd']);
     $this->baseURL = $this->apiWrapper->getIndpEnv('TYPO3_REQUEST_SCRIPT') . '?' . $this->apiWrapper->implodeArrayForUrl('', $urlParameters);
     $this->resultsPerPage = self::RESULTS_PER_PAGE_DEFAULT;
 }
 /**
  * Creates $this->sysPage if it does not exist yet
  *
  * @return void
  */
 protected function createSysPageIfNecessary()
 {
     if (!is_object($this->sysPage)) {
         $this->sysPage = $this->apiWrapper->getPageRepository();
         $this->sysPage->init($GLOBALS['TSFE']->showHiddenPage || $this->pObj->isBEUserLoggedIn());
     }
 }
 /**
  * Retrieves field list to check for modification
  *
  * @param string $tableName
  * @return	array
  */
 protected function getFieldList($tableName)
 {
     if ($tableName == 'pages_language_overlay') {
         $fieldList = TX_REALURL_SEGTITLEFIELDLIST_PLO;
     } else {
         if (isset($this->config['pagePath']['segTitleFieldList'])) {
             $fieldList = $this->config['pagePath']['segTitleFieldList'];
         } else {
             $fieldList = TX_REALURL_SEGTITLEFIELDLIST_DEFAULT;
         }
     }
     $fieldList .= ',hidden';
     return array_unique($this->apiWrapper->trimExplode(',', $fieldList, true));
 }
 /**
  * Creates common configuration template.
  *
  * @return	array		Template
  */
 protected function getTemplate()
 {
     $confTemplate = array('init' => array('enableCHashCache' => true, 'appendMissingSlash' => 'ifNotFile,redirect', 'adminJumpToBackend' => true, 'enableUrlDecodeCache' => true, 'enableUrlEncodeCache' => true, 'emptyUrlReturnValue' => $this->apiWrapper->getIndpEnv('TYPO3_SITE_PATH')), 'pagePath' => array('type' => 'user', 'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main', 'spaceCharacter' => '-', 'languageGetVar' => 'L'), 'fileName' => array('defaultToHTMLsuffixOnPrev' => 0, 'acceptHTMLsuffix' => 1));
     // Add print feature if TemplaVoila is not loaded
     if (!$this->apiWrapper->isExtLoaded('templavoila')) {
         $confTemplate['fileName']['index']['print'] = array('keyValues' => array('type' => 98));
     }
     // Add respectSimulateStaticURLs if SimulateStatic is loaded
     if ($this->apiWrapper->isExtLoaded('simulatestatic')) {
         $confTemplate['init']['respectSimulateStaticURLs'] = true;
     }
     $this->addLanguages($confTemplate);
     // Add from extensions
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/realurl/class.tx_realurl_autoconfgen.php']['extensionConfiguration'])) {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/realurl/class.tx_realurl_autoconfgen.php']['extensionConfiguration'] as $extKey => $userFunc) {
             $params = array('config' => $confTemplate, 'extKey' => $extKey);
             $var = $this->apiWrapper->callUserFunction($userFunc, $params, $this);
             if ($var) {
                 $confTemplate = $var;
             }
         }
     }
     return $confTemplate;
 }
Beispiel #5
0
 /**
  * Outputs a devLog message
  *
  * @param string $message
  * @param int $severity
  * @param mixed $dataVar
  * @return void
  */
 public function devLog($message, $dataVar = false, $severity = 0)
 {
     if ($this->enableDevLog) {
         $this->apiWrapper->devLog('[' . $this->devLogId . '] ' . $message, 'realurl', $severity, $dataVar);
     }
 }