public function initializeAction()
 {
     parent::initializeAction();
     $this->userSession = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Bjr\\BjrLend\\Utility\\UserSession');
     $this->basketRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Bjr\\BjrLend\\Domain\\Repository\\BasketRepository');
     $this->articleRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Bjr\\BjrLend\\Domain\\Repository\\ArticleRepository');
     $this->orderRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Bjr\\BjrLend\\Domain\\Repository\\OrderRepository');
 }
Beispiel #2
0
	/**
	 * Function will be called before every other action
	 *
	 * @return void
	 */
	public function initializeAction() {
		$this->pageUid = (int)GeneralUtility::_GET('id');
		$this->indexerConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['indexed_search']);
		$this->enableMetaphoneSearch = (bool)$this->indexerConfig['enableMetaphoneSearch'];
		$this->indexer = GeneralUtility::makeInstance(Indexer::class);

		parent::initializeAction();
	}
 /**
  * Initializes the controller before invoking an action method.
  *
  * Override this method to solve tasks which all actions have in
  * common.
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $this->dateTime = new \DateTime('now', new \DateTimeZone('Europe/Berlin'));
     $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][GeneralUtility::camelCaseToLowerCaseUnderscored($this->extensionName)]);
     $this->controllerSettings = $this->settings['controllers'][$this->request->getControllerName()];
     $this->actionSettings = $this->controllerSettings['actions'][$this->request->getControllerActionName()];
     $this->currentPageUid = $GLOBALS['TSFE']->id;
 }
 /**
  * initialize the controller
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     //fallback to current pid if no storagePid is defined
     $configuration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     if (empty($configuration['persistence']['storagePid'])) {
         $currentPid['persistence']['storagePid'] = $GLOBALS["TSFE"]->id;
         $this->configurationManager->setConfiguration(array_merge($configuration, $currentPid));
     }
 }
 /**
  * action initialize
  * 
  * @see TYPO3\CMS\Extbase\Mvc\Controller.ActionController::initializeAction()
  */
 public function initializeAction()
 {
     parent::initializeAction();
     $this->config = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
     $this->cacheService->clearPageCache(array($GLOBALS["TSFE"]->id));
     // clear cache
     //$GLOBALS['TSFE']->additionalHeaderData['extCss1'] = '<link rel="stylesheet" type="text/css" href="typo3conf/ext/ajax_data/Resources/Public/Css/AjaxData.css">';
     $GLOBALS['TSFE']->additionalHeaderData['extJs1'] = '<script src="typo3conf/ext/ajax_data/Resources/Public/Js/jquery-1.7.2.min.js" type="text/javascript"></script>';
     $GLOBALS['TSFE']->additionalHeaderData['extJs2'] = '<script src="typo3conf/ext/ajax_data/Resources/Public/Js/AjaxData.js" type="text/javascript"></script>';
 }
 /**
  * Initialize Actions
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $this->cacheUtility = new CacheUtility('bwrk_fluidmenu');
     $this->pid = $GLOBALS['TSFE']->id;
     $this->menuType = isset($this->settings['menuType']) ? $this->settings['menuType'] : 'Default';
     $this->showLevels = isset($this->settings['showLevels']) && !empty($this->settings['showLevels']) ? $this->settings['showLevels'] : 50;
     $this->entryLevel = $this->settings['entryLevel'];
     $this->pagesToExclude = $this->settings['pagesToExclude'];
     $this->rootPageId = $this->getRecursiveRootpageId($this->pid);
 }
 /**
  * initialize the controller and extends settings with stdWrap
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     // Renders the settings like TypoScript if enabled
     if (sizeof($this->settings) > 0 && $this->settings['enableStdWrap'] == 1) {
         $typoScriptService = $this->objectManager->get('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService');
         $settingsAsTypoScriptArray = $typoScriptService->convertPlainArrayToTypoScriptArray($this->settings);
         foreach ($settingsAsTypoScriptArray as $key => $val) {
             if (preg_match("/^(.*)\\.\$/", $key, $m)) {
                 if (isset($settingsAsTypoScriptArray[$key]) && isset($settingsAsTypoScriptArray[$m[1]])) {
                     $this->settings[$m[1]] = $this->configurationManager->getContentObject()->cObjGetSingle($settingsAsTypoScriptArray[$m[1]], $settingsAsTypoScriptArray[$key]);
                     unset($this->settings[$key]);
                 }
             }
         }
     }
     // Check the storagePid
     $this->checkStoragePid();
 }
 public function initializeAction()
 {
     parent::initializeAction();
     //$this->reservationRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Bjr\\BjrLend\\Domain\\Repository\\ReservationRepository');
     //fallback to current pid if no storagePid is defined
     if (version_compare(TYPO3_version, '6.0.0', '>=')) {
         $configuration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     } else {
         $configuration = $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     }
     //t3lib_utility_Debug::debugInPopUpWindow($configuration);
     if (empty($configuration['persistence']['storagePid'])) {
         $currentPid['persistence']['storagePid'] = $GLOBALS["TSFE"]->id;
         $currentPid['persistence']['storagePid'] = 41;
         $this->configurationManager->setConfiguration(array_merge($configuration, $currentPid));
         $this->storagePid = $currentPid['persistence']['storagePid'];
     }
     $this->configuration = $configuration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     //$this->response->addAdditionalHeaderData('<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyAEcQo2dy8dM0fA429C0ZZIcKKyH71r2Tc&amp;sensor=false" type="text/javascript"></script>');
 }
 /**
  * initialize action
  *
  * @return void
  */
 public function initializeAction()
 {
     // execute parent initialize action
     parent::initializeAction();
     // load extension configuration
     $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['moox_comment']);
     $this->fields['rating'] = ['key' => 'rating', 'extkey' => 'moox_comment', 'config' => ['required' => 1, 'validate' => 1, 'type' => 'text', 'data' => ['data-type' => 'text', 'data-id' => 'rating', 'data-label' => LocalizationUtility::translate(self::LLPATH . 'form.rating', $this->extensionName), 'data-required' => 1, 'data-name' => "tx_mooxcomment_pi2[rate][rating]"]]];
     if ($this->settings['ratingMode'] == "stars") {
         $this->fields['rating']['config']['stars'] = [];
         if ($this->settings['stars'] < 5) {
             $this->settings['stars'] = 5;
         }
         if ($this->settings['allowHalfStars']) {
             $step = 0.5;
         } else {
             $step = 1;
         }
         $star = $step;
         while ($star <= $this->settings['stars']) {
             $this->fields['rating']['config']['stars'][] = $star;
             $star = $star + $step;
         }
     }
     if ($this->settings['ratingRequired']) {
     }
     $this->helperService->setAutoDetectionOrder($this->settings['autoDetectionOrder']);
     $this->helperService->setForeignType($this->settings['foreignType'] ? $this->settings['foreignType'] : 'auto');
     if ($this->settings['foreignType'] == "tt_content" && $this->settings['contentElement'] > 0) {
         $this->helperService->setContentUid($this->settings['contentElement']);
     } else {
         $this->helperService->setContentUid($this->configurationManager->getContentObject()->data['uid']);
     }
     if ($this->settings['foreignType'] == "pages" && $this->settings['page'] > 0) {
         $this->helperService->setPageUid($this->settings['page']);
     }
     // initalize storage settings
     $this->initializeStorageSettings();
 }
 /**
  * Initializes the action
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $this->backendSession->setBackendUserAuthentication($GLOBALS['BE_USER'])->createSession($this->sessionKey);
     // Configure page array when page is configured
     $pageId = (int) GeneralUtility::_GP('id');
     if ($pageId > 0) {
         $pagePerms = $this->getBackendUserAuthentication()->getPagePermsClause(1);
         $page = BackendUtility::readPageAccess($pageId, $pagePerms);
         if (is_array($page)) {
             $this->page = $page;
         }
     }
     if (!isset($this->settings['staticTemplate'])) {
         $this->controllerContext = $this->buildControllerContext();
         $this->addFlashMessage(LocalizationUtility::translate('controller.initialize.error.no_typoscript.description', 'my_redirects'), LocalizationUtility::translate('controller.initialize.error.no_typoscript.title', 'my_redirects'), \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
     } else {
         $filters = $this->backendSession->getSessionContents($this->sessionKey);
         if ($filters === false) {
             $filters = array('filter' => array(), 'order' => 'url', 'direction' => QueryInterface::ORDER_ASCENDING);
         }
         if ($this->request->hasArgument('filter')) {
             $filter = $this->request->getArgument('filter');
             if (is_array($filter)) {
                 $filters['filter'] = $this->request->getArgument('filter');
             } else {
                 $filters['filter'] = array();
             }
         }
         if ($this->request->hasArgument('order')) {
             $filters['order'] = $this->request->getArgument('order');
         }
         if ($this->request->hasArgument('direction')) {
             $filters['direction'] = $this->request->getArgument('direction');
         }
         $this->backendSession->saveSessionContents($filters);
     }
 }
 protected function initializeAction()
 {
     $this->mailChimpService->initialize();
     parent::initializeAction();
 }
 protected function initializeAction()
 {
     $this->mapRawPostData();
     parent::initializeAction();
 }
 /**
  * Initializes all actions.
  *
  * @return void
  */
 protected function initializeAction()
 {
     $this->id = (int) GeneralUtility::_GET('id');
     $this->databaseConnection = $GLOBALS['TYPO3_DB'];
     // Fix pagers
     $arguments = GeneralUtility::_GPmerged($this->argumentsKey);
     if ($arguments && is_array($arguments)) {
         foreach ($arguments as $argumentKey => $argumentValue) {
             if ($argumentValue) {
                 if (!in_array($argumentKey, $this->excludedArguments)) {
                     GeneralUtility::_GETset($argumentValue, $this->argumentsKey . '|' . $argumentKey);
                 } else {
                     GeneralUtility::_GETset('', $this->argumentsKey . '|' . $argumentKey);
                 }
             }
         }
     } else {
         $this->forwardToLastModule();
     }
     parent::initializeAction();
 }
 /**
  * initialize the controller
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     //fallback to current pid if no storagePid is defined
     $configuration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
     if (empty($configuration['persistence']['storagePid'])) {
         $currentPid = array();
         $currentPid['persistence']['storagePid'] = $GLOBALS["TSFE"]->id;
         $this->configurationManager->setConfiguration(array_merge($configuration, $currentPid));
     }
     // check settings for css and js
     if (isset($this->settings['includedefaultjs'])) {
         $this->defaultTsConfig['includedefaultjs'] = (int) $this->settings['includedefaultjs'];
     }
     if (isset($this->settings['includedefaultcss'])) {
         $this->defaultTsConfig['includedefaultcss'] = (int) $this->settings['includedefaultcss'];
     }
 }
 /**
  * Initializes all actions.
  *
  * @return void
  */
 protected function initializeAction()
 {
     Utility::checkAndPerformRequiredUpdates();
     $this->currentPageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('id');
     $this->databaseConnection = $GLOBALS['TYPO3_DB'];
     // Fix pagers
     $arguments = GeneralUtility::_GPmerged('tx_realurl_web_realurlrealurl');
     if ($arguments && is_array($arguments)) {
         foreach ($arguments as $argumentKey => $argumentValue) {
             if ($argumentValue) {
                 if (!in_array($argumentKey, $this->excludedArgments)) {
                     GeneralUtility::_GETset($argumentValue, 'tx_realurl_web_realurlrealurl|' . $argumentKey);
                 } else {
                     GeneralUtility::_GETset('', 'tx_realurl_web_realurlrealurl|' . $argumentKey);
                 }
             }
         }
     } else {
         $this->forwardToLastModule();
     }
     parent::initializeAction();
 }
 /**
  * Initialize action
  *
  * @return void
  */
 public function initializeAction()
 {
     $this->pageUid = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('id');
     parent::initializeAction();
 }
 /**
  * initialize the controller
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['moox_core']);
 }
Beispiel #18
0
 /**
  *
  */
 public function initializeAction()
 {
     parent::initializeAction();
     $this->frontendUser = $this->frontendUserService->create();
 }
 /**
  * initialize action
  *
  * @return void
  */
 public function initializeAction()
 {
     // execute parent initialize action
     parent::initializeAction();
     // load extension configuration
     $this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['moox_comment']);
     $this->fields['name'] = ['key' => 'email', 'extkey' => 'moox_comment', 'config' => ['type' => 'text', 'validate' => 1, 'data' => ['data-type' => 'text', 'data-id' => 'name', 'data-label' => LocalizationUtility::translate(self::LLPATH . 'form.name', $this->extensionName)]]];
     $this->fields['email'] = ['key' => 'email', 'extkey' => 'moox_comment', 'config' => ['type' => 'email', 'validate' => 1, 'validator' => 'email', 'data' => ['data-type' => 'email', 'data-id' => 'email', 'data-validator' => 'email', 'data-label' => LocalizationUtility::translate(self::LLPATH . 'form.email', $this->extensionName)]]];
     $this->fields['title'] = ['key' => 'title', 'extkey' => 'moox_comment', 'config' => ['type' => 'text', 'validate' => 0, 'data' => ['data-type' => 'text', 'data-id' => 'title', 'data-label' => LocalizationUtility::translate(self::LLPATH . 'form.title', $this->extensionName)]]];
     $this->fields['comment'] = ['key' => 'comment', 'extkey' => 'moox_comment', 'config' => ['type' => 'text', 'validate' => 0, 'rows' => 5, 'data' => ['data-type' => 'text', 'data-id' => 'comment', 'data-label' => LocalizationUtility::translate(self::LLPATH . 'form.comment', $this->extensionName)]]];
     if ($this->settings['nameRequired']) {
         $this->fields['name']['config']['required'] = 1;
         $this->fields['name']['config']['validate'] = 1;
         $this->fields['name']['config']['data']['data-required'] = 1;
     }
     if ($this->settings['emailRequired']) {
         $this->fields['email']['config']['required'] = 1;
         $this->fields['email']['config']['validate'] = 1;
         $this->fields['email']['config']['data']['data-required'] = 1;
     }
     if ($this->settings['titleRequired']) {
         $this->fields['title']['config']['required'] = 1;
         $this->fields['title']['config']['validate'] = 1;
         $this->fields['title']['config']['data']['data-required'] = 1;
     }
     if ($this->settings['commentRequired']) {
         $this->fields['comment']['config']['required'] = 1;
         $this->fields['comment']['config']['validate'] = 1;
         $this->fields['comment']['config']['data']['data-required'] = 1;
     }
     $this->pagination['pages'] = [10, 25, 50, 100, 250, 500];
     $this->helperService->setAutoDetectionOrder($this->settings['autoDetectionOrder']);
     $this->helperService->setForeignType($this->settings['foreignType'] ? $this->settings['foreignType'] : 'auto');
     if ($this->settings['foreignType'] == "tt_content" && $this->settings['contentElement'] > 0) {
         $this->helperService->setContentUid($this->settings['contentElement']);
     } else {
         $this->helperService->setContentUid($this->configurationManager->getContentObject()->data['uid']);
     }
     if ($this->settings['foreignType'] == "pages" && $this->settings['page'] > 0) {
         $this->helperService->setPageUid($this->settings['page']);
     }
     // initalize storage settings
     $this->initializeStorageSettings();
 }
 /**
  * @throws \Exception
  * @throws \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentException
  * @throws \TYPO3\CMS\Extbase\Property\Exception
  * @throws \TYPO3\CMS\Extbase\Property\Exception\TargetNotFoundException
  */
 protected function initializeAction()
 {
     parent::initializeAction();
 }