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


PHP GeneralUtility::_GET方法代码示例

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


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

示例1: renderStorageMenu

    /**
     * @return string
     */
    protected function renderStorageMenu()
    {
        $currentStorage = $this->getMediaModule()->getCurrentStorage();
        /** @var $storage \TYPO3\CMS\Core\Resource\ResourceStorage */
        $options = '';
        foreach ($this->getMediaModule()->getAllowedStorages() as $storage) {
            $selected = '';
            if ($currentStorage->getUid() == $storage->getUid()) {
                $selected = 'selected';
            }
            $options .= sprintf('<option value="%s" %s>%s %s</option>', $storage->getUid(), $selected, $storage->getName(), $storage->isOnline() ? '' : '(' . LocalizationUtility::translate('offline', 'media') . ')');
        }
        $parameters = GeneralUtility::_GET();
        $inputs = '';
        foreach ($parameters as $parameter => $value) {
            list($parameter, $value) = $this->computeParameterAndValue($parameter, $value);
            if ($parameter !== $this->moduleLoader->getParameterPrefix() . '[storage]') {
                $inputs .= sprintf('<input type="hidden" name="%s" value="%s" />', $parameter, $value);
            }
        }
        $template = '<form action="mod.php" id="form-menu-storage" method="get">
						%s
						<select name="%s[storage]" class="btn btn-min" id="menu-storage" onchange="$(\'#form-menu-storage\').submit()">%s</select>
					</form>';
        return sprintf($template, $inputs, $this->moduleLoader->getParameterPrefix(), $options);
    }
开发者ID:visol,项目名称:media,代码行数:29,代码来源:StorageMenu.php

示例2: initializeAction

 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     $this->id = intval(GeneralUtility::_GET('id'));
     $this->tsParser = new TsParserUtility();
     // extension configuration
     $extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['themes']);
     $extensionConfiguration['categoriesToShow'] = GeneralUtility::trimExplode(',', $extensionConfiguration['categoriesToShow']);
     $extensionConfiguration['constantsToHide'] = GeneralUtility::trimExplode(',', $extensionConfiguration['constantsToHide']);
     // mod.tx_themes.constantCategoriesToShow.value
     $externalConstantCategoriesToShow = $GLOBALS['BE_USER']->getTSConfig('mod.tx_themes.constantCategoriesToShow', BackendUtility::getPagesTSconfig($this->id));
     if ($externalConstantCategoriesToShow['value']) {
         $this->externalConfig['constantCategoriesToShow'] = GeneralUtility::trimExplode(',', $externalConstantCategoriesToShow['value']);
         ArrayUtility::mergeRecursiveWithOverrule($extensionConfiguration['categoriesToShow'], $this->externalConfig['constantCategoriesToShow']);
     } else {
         $this->externalConfig['constantCategoriesToShow'] = array();
     }
     // mod.tx_themes.constantsToHide.value
     $externalConstantsToHide = $GLOBALS['BE_USER']->getTSConfig('mod.tx_themes.constantsToHide', BackendUtility::getPagesTSconfig($this->id));
     if ($externalConstantsToHide['value']) {
         $this->externalConfig['constantsToHide'] = GeneralUtility::trimExplode(',', $externalConstantsToHide['value']);
         ArrayUtility::mergeRecursiveWithOverrule($extensionConfiguration['constantsToHide'], $this->externalConfig['constantsToHide']);
     } else {
         $this->externalConfig['constantsToHide'] = array();
     }
     $this->allowedCategories = $extensionConfiguration['categoriesToShow'];
     $this->deniedFields = $extensionConfiguration['constantsToHide'];
     // initialize normally used values
 }
开发者ID:hensoko,项目名称:themes,代码行数:33,代码来源:EditorController.php

示例3: getContextMenuAction

 /**
  * this is an intermediate clickmenu handler
  *
  * @param ServerRequestInterface $request
  * @param ResponseInterface $response
  * @return ResponseInterface
  */
 public function getContextMenuAction(ServerRequestInterface $request, ResponseInterface $response)
 {
     // XML has to be parsed, no parse errors allowed
     @ini_set('display_errors', 0);
     $clipObj = GeneralUtility::makeInstance(Clipboard::class);
     $clipObj->initializeClipboard();
     // This locks the clipboard to the Normal for this request.
     $clipObj->lockToNormal();
     // Update clipboard if some actions are sent.
     $CB = GeneralUtility::_GET('CB');
     $clipObj->setCmd($CB);
     $clipObj->cleanCurrent();
     // Saves
     $clipObj->endClipboard();
     // Create clickmenu object
     $clickMenu = GeneralUtility::makeInstance(ClickMenu::class);
     // Set internal vars in clickmenu object:
     $clickMenu->clipObj = $clipObj;
     $clickMenu->extClassArray = $this->extClassArray;
     // Set content of the clickmenu with the incoming var, "item"
     $ajaxContent = $clickMenu->init();
     // send the data
     $ajaxContent = '<?xml version="1.0"?><t3ajax>' . $ajaxContent . '</t3ajax>';
     $response->getBody()->write($ajaxContent);
     $response = $response->withHeader('Content-Type', 'text/xml; charset=utf-8');
     return $response;
 }
开发者ID:vip3out,项目名称:TYPO3.CMS,代码行数:34,代码来源:ClickMenuController.php

示例4: initialize

 public function initialize()
 {
     $feUserObj = EidUtility::initFeUser();
     $pageId = GeneralUtility::_GET('id') ?: 1;
     /** @var TypoScriptFrontendController $typoScriptFrontendController */
     $typoScriptFrontendController = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], $pageId, 0, TRUE);
     $GLOBALS['TSFE'] = $typoScriptFrontendController;
     $typoScriptFrontendController->connectToDB();
     $typoScriptFrontendController->fe_user = $feUserObj;
     $typoScriptFrontendController->id = 2653;
     $typoScriptFrontendController->determineId();
     $typoScriptFrontendController->getCompressedTCarray();
     $typoScriptFrontendController->initTemplate();
     $typoScriptFrontendController->getConfigArray();
     $typoScriptFrontendController->includeTCA();
     /** @var TypoScriptService $typoScriptService */
     $typoScriptService = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService');
     $pluginTyposcript = $typoScriptFrontendController->tmpl->setup['plugin.'][$this->extensionConfiguration['extensionKey'] . '.'];
     $this->pluginConfiguration = $typoScriptService->convertTypoScriptArrayToPlainArray($pluginTyposcript);
     // Set configuration to call the plugin
     $extensionConfiguration['settings'] = $this->pluginConfiguration['settings'];
     $extensionConfiguration['persistence'] = $this->pluginConfiguration['persistence'];
     $this->extensionConfiguration = array_merge($extensionConfiguration, $this->extensionConfiguration);
     $this->bootstrap = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Core\\Bootstrap');
     $this->bootstrap->initialize($this->extensionConfiguration);
 }
开发者ID:guso15,项目名称:promoshop,代码行数:26,代码来源:EidBootstrapUtility.php

示例5: setImageorientItems

 /**
  * @param $imageorientConfig
  * @return array
  */
 public function setImageorientItems(&$imageorientConfig)
 {
     $pageTsConfig = BackendUtility::getPagesTSconfig(GeneralUtility::_GET('id'));
     $pageTsConfig = GeneralUtility::removeDotsFromTS($pageTsConfig);
     if (array_key_exists('tx_customresponsiveimages', $pageTsConfig)) {
         $responsiveImageConfiguration = $pageTsConfig['tx_customresponsiveimages'];
     } else {
         $responsiveImageConfiguration = array();
     }
     $groupedItems = array();
     $i = 0;
     foreach ($responsiveImageConfiguration['items'] as $imageorient => $item) {
         $groupedItems[$item['group']][$i][] = $GLOBALS['LANG']->sL($item['label']);
         $groupedItems[$item['group']][$i][] = $imageorient;
         $groupedItems[$item['group']][$i][] = array_key_exists('icon', $item) && !empty($item['icon']) ? $responsiveImageConfiguration['seliconsPath'] . $item['icon'] : NULL;
         $i++;
     }
     $imageOrientItems = array();
     foreach ($responsiveImageConfiguration['groups'] as $groupName => $group) {
         if (array_key_exists('label', $group) && !empty($group['label'])) {
             $imageOrientItems[] = array($GLOBALS['LANG']->sL($group['label']), '--div--');
         }
         if (array_key_exists($groupName, $groupedItems)) {
             foreach ($groupedItems[$groupName] as $item) {
                 array_push($imageOrientItems, $item);
             }
         }
     }
     $imageorientConfig['items'] = $imageOrientItems;
 }
开发者ID:visol,项目名称:ext-customresponsiveimages,代码行数:34,代码来源:ImageorientItemsProcFunc.php

示例6: initializeAction

 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     $this->id = intval(GeneralUtility::_GET('id'));
     $this->tsParser = new TsParserUtility();
     // Get extension configuration
     /** @var \TYPO3\CMS\Extensionmanager\Utility\ConfigurationUtility $configurationUtility */
     $configurationUtility = $this->objectManager->get('TYPO3\\CMS\\Extensionmanager\\Utility\\ConfigurationUtility');
     $extensionConfiguration = $configurationUtility->getCurrentConfiguration('themes');
     // Initially, get configuration from extension manager!
     $extensionConfiguration['categoriesToShow'] = GeneralUtility::trimExplode(',', $extensionConfiguration['categoriesToShow']['value']);
     $extensionConfiguration['constantsToHide'] = GeneralUtility::trimExplode(',', $extensionConfiguration['constantsToHide']['value']);
     // mod.tx_themes.constantCategoriesToShow.value
     // Get value from page/user typoscript
     $externalConstantCategoriesToShow = $this->getBackendUser()->getTSConfig('mod.tx_themes.constantCategoriesToShow', BackendUtility::getPagesTSconfig($this->id));
     if ($externalConstantCategoriesToShow['value']) {
         $this->externalConfig['constantCategoriesToShow'] = GeneralUtility::trimExplode(',', $externalConstantCategoriesToShow['value']);
         $extensionConfiguration['categoriesToShow'] = array_merge($extensionConfiguration['categoriesToShow'], $this->externalConfig['constantCategoriesToShow']);
     }
     // mod.tx_themes.constantsToHide.value
     // Get value from page/user typoscript
     $externalConstantsToHide = $this->getBackendUser()->getTSConfig('mod.tx_themes.constantsToHide', BackendUtility::getPagesTSconfig($this->id));
     if ($externalConstantsToHide['value']) {
         $this->externalConfig['constantsToHide'] = GeneralUtility::trimExplode(',', $externalConstantsToHide['value']);
         $extensionConfiguration['constantsToHide'] = array_merge($extensionConfiguration['constantsToHide'], $this->externalConfig['constantsToHide']);
     }
     $this->allowedCategories = $extensionConfiguration['categoriesToShow'];
     $this->deniedFields = $extensionConfiguration['constantsToHide'];
     // initialize normally used values
 }
开发者ID:typo3-themes,项目名称:themes,代码行数:34,代码来源:EditorController.php

示例7: main

 /**
  * Main function
  *
  * @param   [type]    $$backRef: ...
  * @param   [type]    $menuItems: ...
  * @param   [type]    $table: ...
  * @param   [type]    $uid: ...
  * @return  [type]    ...
  */
 function main(&$backRef, $menuItems, $table, $uid)
 {
     global $BE_USER, $TCA, $LANG;
     $localItems = array();
     if (!$backRef->cmLevel) {
         // Returns directly, because the clicked item was not from the pages table
         if ($table == "tx_l10nmgr_cfg") {
             // Adds the regular item:
             $LL = $this->includeLL();
             // Repeat this (below) for as many items you want to add!
             // Remember to add entries in the localconf.php file for additional titles.
             $url = ExtensionManagementUtility::extRelPath("l10nmgr") . "cm1/index.php?id=" . $uid;
             $localItems[] = $backRef->linkItem($GLOBALS["LANG"]->getLLL("cm1_title", $LL), $backRef->excludeIcon('<img src="' . ExtensionManagementUtility::extRelPath("l10nmgr") . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" />'), $backRef->urlRefForCM($url), 1);
         }
         $localItems["moreoptions_tx_l10nmgr_cm3"] = $backRef->linkItem('L10Nmgr tools', '', "top.loadTopMenu('" . GeneralUtility::linkThisScript() . "&cmLevel=1&subname=moreoptions_tx_l10nmgrXX_cm3');return false;", 0, 1);
         // Simply merges the two arrays together and returns ...
         $menuItems = array_merge($menuItems, $localItems);
     } elseif (GeneralUtility::_GET('subname') == 'moreoptions_tx_l10nmgrXX_cm3') {
         $url = ExtensionManagementUtility::extRelPath("l10nmgr") . "cm3/index.php?id=" . $uid . '&table=' . $table;
         $localItems[] = $backRef->linkItem('Create priority', '', $backRef->urlRefForCM($url . '&cmd=createPriority'), 1);
         $localItems[] = $backRef->linkItem('Manage priorities', '', $backRef->urlRefForCM($url . '&cmd=managePriorities'), 1);
         $localItems[] = $backRef->linkItem('Update Index', '', $backRef->urlRefForCM($url . '&cmd=updateIndex'), 1);
         $localItems[] = $backRef->linkItem('Flush Translations', '', $backRef->urlRefForCM($url . '&cmd=flushTranslations'), 1);
         $menuItems = array_merge($menuItems, $localItems);
     }
     return $menuItems;
 }
开发者ID:xf-,项目名称:l10nmgr-1,代码行数:36,代码来源:Clickmenu.php

示例8: __construct

 /**
  * Initialize frontend environment
  */
 public function __construct()
 {
     if (empty($_POST['tx_ajaxexample_piexample']['action'])) {
         $_POST['tx_ajaxexample_piexample']['action'] = 'hello';
     }
     $_POST['tx_ajaxexample_piexample']['controller'] = 'Example';
     $this->bootstrap = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Core\\Bootstrap');
     $feUserObj = EidUtility::initFeUser();
     $pageId = GeneralUtility::_GET('id') ?: 1;
     /** @var TypoScriptFrontendController $typoScriptFrontendController */
     $typoScriptFrontendController = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], $pageId, 0, TRUE);
     $GLOBALS['TSFE'] = $typoScriptFrontendController;
     $typoScriptFrontendController->connectToDB();
     $typoScriptFrontendController->fe_user = $feUserObj;
     $typoScriptFrontendController->id = $pageId;
     $typoScriptFrontendController->determineId();
     $typoScriptFrontendController->getCompressedTCarray();
     $typoScriptFrontendController->initTemplate();
     $typoScriptFrontendController->getConfigArray();
     $typoScriptFrontendController->includeTCA();
     /** @var TypoScriptService $typoScriptService */
     $typoScriptService = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Service\\TypoScriptService');
     $pluginConfiguration = $typoScriptService->convertTypoScriptArrayToPlainArray($typoScriptFrontendController->tmpl->setup['plugin.']['tx_ajaxexample.']);
     // Set configuration to call the plugin
     $this->pluginConfiguration = array('pluginName' => 'PiExample', 'vendorName' => 'Helhum', 'extensionName' => 'AjaxExample', 'controller' => 'Example', 'action' => $_POST['tx_ajaxexample_piexample']['action'], 'mvc' => array('requestHandlers' => array('TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler' => 'TYPO3\\CMS\\Extbase\\Mvc\\Web\\FrontendRequestHandler')), 'settings' => $pluginConfiguration['settings'], 'persistence' => array('storagePid' => $pluginConfiguration['persistence']['storagePid']));
 }
开发者ID:paul-schulleri,项目名称:ajax_example,代码行数:29,代码来源:EidRequestBootstrap.php

示例9: main

 public function main()
 {
     $result = $error = $url = NULL;
     $this->view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($this->templatePath . 'Main.html'));
     if ($this->configuration->isValid()) {
         try {
             $this->checkPageId();
             $url = $this->urlService->getFullUrl($this->pageId, $this->pObj->MOD_SETTINGS);
             if (GeneralUtility::_GET('clear')) {
                 $this->pageSpeedRepository->clearByIdentifier($url);
                 $this->view->assign('cacheCleared', TRUE);
             }
             $result = $this->pageSpeedRepository->findByIdentifier($url);
         } catch (\HTTP_Request2_ConnectionException $e) {
             $error = 'error.http_request.connection';
             // todo add log
         } catch (\RuntimeException $e) {
             $error = $e->getMessage();
         }
     } else {
         $error = 'error.invalid.key';
     }
     $this->view->assignMultiple(array('lll' => 'LLL:EXT:page_speed/Resources/Private/Language/locallang.xlf:', 'menu' => $this->modifyFuncMenu(BackendUtility::getFuncMenu($this->pObj->id, 'SET[language]', $this->pObj->MOD_SETTINGS['language'], $this->pObj->MOD_MENU['language']), 'language'), 'configuration' => $this->configuration, 'result' => $result, 'url' => $url, 'error' => $error, 'pageId' => $this->pageId));
     return $this->view->render();
 }
开发者ID:thodison,项目名称:page_speed,代码行数:25,代码来源:ModFuncController.php

示例10: renderForeignRecordHeaderControl_postProcess

 /**
  * Post-processing to define which control items to show. Possibly own icons can be added here.
  *
  * @param string $parentUid The uid of the parent (embedding) record (uid or NEW...)
  * @param string $foreignTable The table (foreign_table) we create control-icons for
  * @param array $childRecord The current record of that foreign_table
  * @param array $childConfig TCA configuration of the current field of the child record
  * @param boolean $isVirtual Defines whether the current records is only virtually shown and not physically part of the parent record
  * @param array $controlItems (reference) Associative array with the currently available control items
  *
  * @return void
  */
 public function renderForeignRecordHeaderControl_postProcess($parentUid, $foreignTable, array $childRecord, array $childConfig, $isVirtual, array &$controlItems)
 {
     if ($foreignTable != 'sys_file_reference') {
         return;
     }
     if (!GeneralUtility::isFirstPartOfStr($childRecord['uid_local'], 'sys_file_')) {
         return;
     }
     $parts = BackendUtility::splitTable_Uid($childRecord['uid_local']);
     if (!isset($parts[1])) {
         return;
     }
     $table = $childRecord['tablenames'];
     $uid = $parentUid;
     $arguments = GeneralUtility::_GET();
     if ($this->isValidRecord($table, $uid) && isset($arguments['edit'])) {
         $returnUrl = ['edit' => $arguments['edit'], 'returnUrl' => $arguments['returnUrl']];
         if (GeneralUtility::compat_version('7.0')) {
             $returnUrlGenerated = BackendUtility::getModuleUrl('record_edit', $returnUrl);
         } else {
             $returnUrlGenerated = 'alt_doc.php?' . ltrim(GeneralUtility::implodeArrayForUrl('', $returnUrl, '', true, true), '&') . BackendUtility::getUrlToken('editRecord');
         }
         $wizardArguments = ['P' => ['referenceUid' => $childRecord['uid'], 'returnUrl' => $returnUrlGenerated]];
         $wizardUri = BackendUtility::getModuleUrl('focuspoint', $wizardArguments);
     } else {
         $wizardUri = 'javascript:alert(\'Please save the base record first, because open this wizard will not save the changes in the current form!\');';
     }
     /** @var WizardService $wizardService */
     $wizardService = GeneralUtility::makeInstance('HDNET\\Focuspoint\\Service\\WizardService');
     $this->arrayUnshiftAssoc($controlItems, 'focuspoint', $wizardService->getWizardButton($wizardUri));
 }
开发者ID:mcmz,项目名称:focuspoint,代码行数:43,代码来源:InlineRecord.php

示例11: preStartPageHook

 /**
  * Hook-function: inject t3editor JavaScript code before the page is compiled
  * called in \TYPO3\CMS\Backend\Template\DocumentTemplate:startPage
  *
  * @param array $parameters
  * @param \TYPO3\CMS\Backend\Template\DocumentTemplate $documentTemplate
  * @see \TYPO3\CMS\Backend\Template\DocumentTemplate::startPage
  */
 public function preStartPageHook($parameters, $documentTemplate)
 {
     if (GeneralUtility::_GET('M') === 'file_edit') {
         $t3editor = $this->getT3editor();
         $documentTemplate->JScode .= $t3editor->getJavascriptCode($documentTemplate);
         $documentTemplate->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/T3editor/FileEdit');
     }
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:16,代码来源:FileEditHook.php

示例12: getNextTransactionId

 /**
  * @return int
  */
 protected function getNextTransactionId()
 {
     $transaction = 0;
     if (GeneralUtility::_GET('sEcho')) {
         $transaction = (int) GeneralUtility::_GET('sEcho') + 1;
     }
     return $transaction;
 }
开发者ID:BergischMedia,项目名称:vidi,代码行数:11,代码来源:ToJsonViewHelper.php

示例13: render

 /**
  * Returns the "back" buttons to be placed in the doc header.
  *
  * @return string
  */
 public function render()
 {
     $result = '';
     if (GeneralUtility::_GET('returnUrl')) {
         $result = sprintf('<a href="%s" class="btn btn-default btn-return-top">%s</a>', GeneralUtility::_GP('returnUrl'), $this->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL));
     }
     return $result;
 }
开发者ID:BergischMedia,项目名称:vidi,代码行数:13,代码来源:BackViewHelper.php

示例14: render

 public function render(\GeorgRinger\News\Domain\Model\News $newsItem)
 {
     $vars = GeneralUtility::_GET('tx_news_pi1');
     if (isset($vars['news']) && (int) $newsItem->getUid() === (int) $vars['news']) {
         return $this->renderThenChild();
     } else {
         return $this->renderElseChild();
     }
 }
开发者ID:BastianBalthasarBux,项目名称:news,代码行数:9,代码来源:IfIsActiveViewHelper.php

示例15: initializeAction

 /**
  * Initializes the current action
  */
 protected function initializeAction()
 {
     // Set default value of PID to know where to store/look for newsletter
     $this->pid = filter_var(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('id'), FILTER_VALIDATE_INT, ['min_range' => 0]);
     if (!$this->pid) {
         $this->pid = 0;
     }
     parent::initializeAction();
 }
开发者ID:ecodev,项目名称:newsletter,代码行数:12,代码来源:NewsletterController.php


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