本文整理汇总了PHP中TYPO3\CMS\Extbase\Mvc\Controller\ActionController::initializeAction方法的典型用法代码示例。如果您正苦于以下问题:PHP ActionController::initializeAction方法的具体用法?PHP ActionController::initializeAction怎么用?PHP ActionController::initializeAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Extbase\Mvc\Controller\ActionController
的用法示例。
在下文中一共展示了ActionController::initializeAction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initializeAction
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');
}
示例2: 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;
}
示例3: 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['persistence']['storagePid'] = $GLOBALS["TSFE"]->id;
$this->configurationManager->setConfiguration(array_merge($configuration, $currentPid));
}
}
示例4: initializeAction
/**
* 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>';
}
示例5: initializeAction
/**
* 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);
}
示例6: initializeAction
/**
* 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();
}
示例7: initializeAction
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&sensor=false" type="text/javascript"></script>');
}
示例8: initializeAction
/**
* 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();
}
示例9: initializeAction
/**
* 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);
}
}
示例10: initializeAction
protected function initializeAction()
{
$this->mailChimpService->initialize();
parent::initializeAction();
}
示例11: initializeAction
protected function initializeAction()
{
$this->mapRawPostData();
parent::initializeAction();
}
示例12: 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();
}
示例13: 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'];
}
}
示例14: initializeAction
/**
* 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();
}
示例15: initializeAction
/**
* Initialize action
*
* @return void
*/
public function initializeAction()
{
$this->pageUid = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('id');
parent::initializeAction();
}