当前位置: 首页>>代码示例>>PHP>>正文


PHP GeneralUtility::_POST方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Core\Utility\GeneralUtility::_POST方法的典型用法代码示例。如果您正苦于以下问题:PHP GeneralUtility::_POST方法的具体用法?PHP GeneralUtility::_POST怎么用?PHP GeneralUtility::_POST使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Core\Utility\GeneralUtility的用法示例。


在下文中一共展示了GeneralUtility::_POST方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: saveStopWordsAction

 /**
  * Saves the edited stop word list to Solr
  *
  * @return void
  */
 public function saveStopWordsAction()
 {
     $solrConnection = $this->getSelectedCoreSolrConnection();
     $postParameters = GeneralUtility::_POST('tx_solr_tools_solradministration');
     // lowercase stopword before saving because terms get lowercased before stopword filtering
     $newStopWords = $this->stringUtility->toLower($postParameters['stopWords']);
     $newStopWords = GeneralUtility::trimExplode("\n", $newStopWords, true);
     $oldStopWords = $solrConnection->getStopWords();
     $wordsRemoved = true;
     $removedStopWords = array_diff($oldStopWords, $newStopWords);
     foreach ($removedStopWords as $word) {
         $response = $solrConnection->deleteStopWord($word);
         if ($response->getHttpStatus() != 200) {
             $wordsRemoved = false;
             $this->addFlashMessage('Failed to remove stop word "' . $word . '".', 'An error occurred', FlashMessage::ERROR);
             break;
         }
     }
     $wordsAdded = true;
     $addedStopWords = array_diff($newStopWords, $oldStopWords);
     if (!empty($addedStopWords)) {
         $wordsAddedResponse = $solrConnection->addStopWords($addedStopWords);
         $wordsAdded = $wordsAddedResponse->getHttpStatus() == 200;
     }
     $reloadResponse = $solrConnection->reloadCore();
     if ($wordsRemoved && $wordsAdded && $reloadResponse->getHttpStatus() == 200) {
         $this->addFlashMessage('Stop Words Updated.');
     }
     $this->forwardToIndex();
 }
开发者ID:sitegeist,项目名称:ext-solr,代码行数:35,代码来源:StopWordsModuleController.php

示例2: initializeIndexQueueAction

 /**
  * Initializes the Index Queue for selected indexing configurations
  *
  * @return void
  */
 public function initializeIndexQueueAction()
 {
     $initializedIndexingConfigurations = array();
     $itemIndexQueue = GeneralUtility::makeInstance('Tx_Solr_IndexQueue_Queue');
     $indexingConfigurationsToInitialize = GeneralUtility::_POST('tx_solr-index-queue-initialization');
     if (!empty($indexingConfigurationsToInitialize)) {
         // initialize selected indexing configuration
         foreach ($indexingConfigurationsToInitialize as $indexingConfigurationName) {
             $initializedIndexingConfiguration = $itemIndexQueue->initialize($this->site, $indexingConfigurationName);
             // track initialized indexing configurations for the flash message
             $initializedIndexingConfigurations = array_merge($initializedIndexingConfigurations, $initializedIndexingConfiguration);
         }
     } else {
         $this->addFlashMessage('No indexing configurations selected.', 'Index Queue not initialized', FlashMessage::WARNING);
     }
     $messagesForConfigurations = array();
     foreach (array_keys($initializedIndexingConfigurations) as $indexingConfigurationName) {
         $itemCount = $itemIndexQueue->getItemsCountBySite($this->site, $indexingConfigurationName);
         if (!is_int($itemCount)) {
             $itemCount = 0;
         }
         $messagesForConfigurations[] = $indexingConfigurationName . ' (' . $itemCount . ' records)';
     }
     if (!empty($initializedIndexingConfigurations)) {
         $this->addFlashMessage('Initialized indexing configurations: ' . implode(', ', $messagesForConfigurations), 'Index Queue initialized', FlashMessage::OK);
     }
     $this->forward('index');
 }
开发者ID:punktDe,项目名称:solr,代码行数:33,代码来源:IndexQueueModuleController.php

示例3: createTag

 /**
  * Create a tag
  *
  * @param array $params
  * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj
  * @return void
  * @throws \Exception
  */
 public function createTag(array $params, \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj)
 {
     $request = GeneralUtility::_POST();
     try {
         // Check if a tag is submitted
         if (!isset($request['item']) || empty($request['item'])) {
             throw new \Exception('error_no-tag');
         }
         $itemUid = $request['uid'];
         if ((int) $itemUid === 0 && (strlen($itemUid) == 16 && !GeneralUtility::isFirstPartOfStr($itemUid, 'NEW'))) {
             throw new \Exception('error_no-uid');
         }
         $table = $request['table'];
         if (empty($table)) {
             throw new \Exception('error_no-table');
         }
         // Get tag uid
         $newTagId = $this->getTagUid($request);
         $ajaxObj->setContentFormat('javascript');
         $ajaxObj->setContent('');
         $response = array($newTagId, $request['item'], self::TAG, $table, 'tags', 'data[' . htmlspecialchars($table) . '][' . $itemUid . '][tags]', $itemUid);
         $ajaxObj->setJavascriptCallbackWrap(implode('-', $response));
     } catch (\Exception $e) {
         $errorMsg = $GLOBALS['LANG']->sL(self::LLPATH . $e->getMessage());
         $ajaxObj->setError($errorMsg);
     }
 }
开发者ID:beechit,项目名称:tag_items,代码行数:35,代码来源:SuggestReceiverCall.php

示例4: adminLinks

 /**
  * Administrative links for a table / record.
  *
  * @param string $table Table name
  * @param array  $row   Record for which administrative links are generated.
  *
  * @return string HTML link tags.
  */
 public function adminLinks($table, array $row)
 {
     if ($table !== 'tx_commerce_products') {
         return parent::adminLinks($table, $row);
     } else {
         $language = $this->getLanguageService();
         // Edit link:
         $adminLink = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick('&edit[' . $table . '][' . $row['uid'] . ']=edit', $this->getBackPath())) . '">' . IconUtility::getSpriteIcon('actions-document-open', array('title' => $language->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', true))) . '</a>';
         // Delete link:
         $adminLink .= '<a href="' . htmlspecialchars($this->doc->issueCommand('&cmd[' . $table . '][' . $row['uid'] . '][delete]=1')) . '">' . IconUtility::getSpriteIcon('actions-edit-delete', array('title' => $language->sL('LLL:EXT:lang/locallang_core.php:cm.delete', true))) . '</a>';
         if ($row['pid'] == -1) {
             // get page TSconfig
             $pagesTyposcriptConfig = BackendUtility::getPagesTSconfig(GeneralUtility::_POST('popViewId'));
             if ($pagesTyposcriptConfig['tx_commerce.']['singlePid']) {
                 $previewPageId = $pagesTyposcriptConfig['tx_commerce.']['singlePid'];
             } else {
                 $previewPageId = SettingsFactory::getInstance()->getExtConf('previewPageID');
             }
             $sysLanguageUid = (int) $row['sys_language_uid'];
             /**
              * Product.
              *
              * @var \CommerceTeam\Commerce\Domain\Model\Product $product
              */
             $product = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('CommerceTeam\\Commerce\\Domain\\Model\\Product', $row['t3ver_oid'], $sysLanguageUid);
             $product->loadData();
             $getVars = ($sysLanguageUid > 0 ? '&L=' . $sysLanguageUid : '') . '&ADMCMD_vPrev[' . rawurlencode($table . ':' . $row['t3ver_oid']) . ']=' . $row['uid'] . '&no_cache=1&tx_commerce_pi1[showUid]=' . $product->getUid() . '&tx_commerce_pi1[catUid]=' . current($product->getMasterparentCategory());
             $adminLink .= '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($previewPageId, $this->getBackPath(), BackendUtility::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
         }
         return $adminLink;
     }
 }
开发者ID:BenjaminBeck,项目名称:commerce,代码行数:40,代码来源:VersionModuleController.php

示例5: main

 /**
  * Run the wizard and output HTML.
  *
  * @return void
  */
 public function main()
 {
     $p = GeneralUtility::_GP('P');
     if (isset($p['itemName'])) {
         $this->parentFormItemName = $p['itemName'];
     }
     if (isset($p['fieldChangeFunc']['TBE_EDITOR_fieldChanged'])) {
         $this->parentFormFieldChangeFunc = $p['fieldChangeFunc']['TBE_EDITOR_fieldChanged'];
     }
     if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tx_openid_mode') === 'finish' && $this->openIDResponse === NULL) {
         $this->includePHPOpenIDLibrary();
         $openIdConsumer = $this->getOpenIDConsumer();
         $this->openIDResponse = $openIdConsumer->complete($this->getReturnUrl());
         $this->handleResponse();
         $this->renderHtml();
         return;
     } elseif (GeneralUtility::_POST('openid_url') != '') {
         $openIDIdentifier = GeneralUtility::_POST('openid_url');
         $this->sendOpenIDRequest($openIDIdentifier);
         // When sendOpenIDRequest() returns, there was an error
         $flashMessageService = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessageService');
         $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', sprintf($GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:error.setup'), htmlspecialchars($openIDIdentifier)), $GLOBALS['LANG']->sL('LLL:EXT:openid/Resources/Private/Language/Wizard.xlf:title.error'), \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
         $flashMessageService->getMessageQueueByIdentifier()->enqueue($flashMessage);
     }
     $this->renderHtml();
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:31,代码来源:Wizard.php

示例6: initializeIndexQueueAction

 /**
  * Initializes the Index Queue for selected indexing configurations
  *
  * @return void
  */
 public function initializeIndexQueueAction()
 {
     $initializedIndexingConfigurations = array();
     $itemIndexQueue = GeneralUtility::makeInstance('Tx_Solr_IndexQueue_Queue');
     $indexingConfigurationsToInitialize = GeneralUtility::_POST('tx_solr-index-queue-initialization');
     if (!empty($indexingConfigurationsToInitialize)) {
         // initialize selected indexing configuration
         foreach ($indexingConfigurationsToInitialize as $indexingConfigurationName) {
             $initializedIndexingConfiguration = $itemIndexQueue->initialize($this->site, $indexingConfigurationName);
             // track initialized indexing configurations for the flash message
             $initializedIndexingConfigurations = array_merge($initializedIndexingConfigurations, $initializedIndexingConfiguration);
         }
     } else {
         $messageLabel = 'solr.backend.index_queue_module.flashmessage.initialize.no_selection';
         $titleLabel = 'solr.backend.index_queue_module.flashmessage.not_initialized.title';
         $this->addFlashMessage(LocalizationUtility::translate($messageLabel, 'Solr'), LocalizationUtility::translate($titleLabel, 'Solr'), FlashMessage::WARNING);
     }
     $messagesForConfigurations = array();
     foreach (array_keys($initializedIndexingConfigurations) as $indexingConfigurationName) {
         $itemCount = $itemIndexQueue->getItemsCountBySite($this->site, $indexingConfigurationName);
         if (!is_int($itemCount)) {
             $itemCount = 0;
         }
         $messagesForConfigurations[] = $indexingConfigurationName . ' (' . $itemCount . ' records)';
     }
     if (!empty($initializedIndexingConfigurations)) {
         $messageLabel = 'solr.backend.index_queue_module.flashmessage.initialize.success';
         $titleLabel = 'solr.backend.index_queue_module.flashmessage.initialize.title';
         $this->addFlashMessage(LocalizationUtility::translate($messageLabel, 'Solr', array(implode(', ', $messagesForConfigurations))), LocalizationUtility::translate($titleLabel, 'Solr'), FlashMessage::OK);
     }
     $this->forward('index');
 }
开发者ID:romaincanon,项目名称:ext-solr,代码行数:37,代码来源:IndexQueueModuleController.php

示例7: doAction

 /**
  * Single entry point for all MShop admin requests.
  *
  * @return JSON 2.0 RPC message response
  */
 public function doAction()
 {
     $param = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST();
     if (($content = file_get_contents('php://input')) === false) {
         throw new \RuntimeException('Unable to get request content');
     }
     $this->view->assign('response', $this->getController()->process($param, $content));
 }
开发者ID:aimeos,项目名称:aimeos-typo3,代码行数:13,代码来源:ExtadmController.php

示例8: isClicked

 /**
  * return true if the button is clicked
  * @return bool
  */
 public function isClicked()
 {
     if ($this->form->isSubmitted()) {
         $post = GeneralUtility::_POST($this->form->getIdentifier());
         return isset($post[$this->getName()]);
     }
     return false;
 }
开发者ID:ameos,项目名称:ameos_form,代码行数:12,代码来源:Submit.php

示例9: initializeCreateAction

 /**
  * Rewrite Arguments to receive a clean mail object in createAction
  *
  * @return void
  */
 public function initializeCreateAction()
 {
     $this->reformatParamsForAction();
     $this->forwardIfFormParamsDoNotMatch();
     if ($this->settings['debug']['variables']) {
         GeneralUtility::devLog('Variables', $this->extensionName, 0, GeneralUtility::_POST());
     }
 }
开发者ID:abeyl,项目名称:powermail,代码行数:13,代码来源:FormController.php

示例10: showtextAction

 /**
  * action showtext
  * 
  * @param
  * @return string $response
  */
 public function showtextAction()
 {
     $arg1 = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('a1');
     $arg2 = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('a2');
     $returnStr = '';
     $returnStr = '"' . $arg1 . ' ' . $arg2 . '" ' . 'from Server as a Response!';
     return $returnStr;
 }
开发者ID:nirmalyamondal,项目名称:TYPO3-Extensions,代码行数:14,代码来源:Typo3AjaxController.php

示例11: getFileWithAbsolutePath

 /**
  * Get the file with its absolute path.
  *
  * @return string
  */
 public function getFileWithAbsolutePath()
 {
     $fileIdentifier = GeneralUtility::_POST('qquuid');
     if (!empty($fileIdentifier)) {
         $fileIdentifier .= '-';
     }
     return $this->uploadFolder . DIRECTORY_SEPARATOR . $fileIdentifier . $this->name;
 }
开发者ID:visol,项目名称:media,代码行数:13,代码来源:UploadedFileAbstract.php

示例12: saveSortingState

 /**
  * Saves the sorting order of tasks in the backend user's uc
  *
  * @param array $params Array of parameters from the AJAX interface, currently unused
  * @param \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj Object of type TYPO3AJAX
  * @return void
  */
 public function saveSortingState(array $params, \TYPO3\CMS\Core\Http\AjaxRequestHandler $ajaxObj)
 {
     $sort = array();
     $items = explode('&', \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('data'));
     foreach ($items as $item) {
         $sort[] = substr($item, 12);
     }
     $GLOBALS['BE_USER']->uc['taskcenter']['sorting'] = serialize($sort);
     $GLOBALS['BE_USER']->writeUC();
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:17,代码来源:TaskStatus.php

示例13: saveSortingState

 /**
  * Saves the sorting order of tasks in the backend user's uc
  *
  * @param array $params Array of parameters from the AJAX interface, currently unused
  * @param AjaxRequestHandler $ajaxObj Object of type AjaxRequestHandler
  * @return void
  */
 public function saveSortingState(array $params, AjaxRequestHandler $ajaxObj)
 {
     $sort = array();
     $items = explode('&', GeneralUtility::_POST('data'));
     foreach ($items as $item) {
         $sort[] = substr($item, 12);
     }
     $this->getBackendUserAuthentication()->uc['taskcenter']['sorting'] = serialize($sort);
     $this->getBackendUserAuthentication()->writeUC();
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:17,代码来源:TaskStatus.php

示例14: main

 /**
  * Updates nested sets
  *
  * @return	string		HTML output
  */
 public function main()
 {
     if (\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('nssubmit') != '') {
         $this->updateOverridePaths();
         $content = 'Update finished successfully.';
     } else {
         $content = $this->prompt();
     }
     return $content;
 }
开发者ID:randomresult,项目名称:Introduction,代码行数:15,代码来源:class.ext_update.php

示例15: showtextAction

 /**
  * action showtext
  * 
  * @param
  * @return string $response
  */
 public function showtextAction()
 {
     $ajaxParams = \TYPO3\CMS\Core\Utility\GeneralUtility::_POST('request');
     $argsArray = $ajaxParams['arguments'];
     $arg1 = $argsArray['a1'];
     $arg2 = $argsArray['a2'];
     $returnStr = '';
     $returnStr = $arg1 . ' ' . $arg2 . ' ' . 'from Server as a Response!';
     return $returnStr;
 }
开发者ID:nirmalyamondal,项目名称:TYPO3-Extensions,代码行数:16,代码来源:AjaxUtility.php


注:本文中的TYPO3\CMS\Core\Utility\GeneralUtility::_POST方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。