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


PHP BackendUtility::getModuleUrl方法代码示例

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


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

示例1: getAdminAccountStatus

 /**
  * Checks whether a an BE user account named admin with default password exists.
  *
  * @return \TYPO3\CMS\Reports\Status An object representing whether a default admin account exists
  */
 protected function getAdminAccountStatus()
 {
     $value = $GLOBALS['LANG']->getLL('status_ok');
     $message = '';
     $severity = \TYPO3\CMS\Reports\Status::OK;
     $whereClause = 'username = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('admin', 'be_users') . BackendUtility::deleteClause('be_users');
     $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, username, password', 'be_users', $whereClause);
     $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
     if (!empty($row)) {
         $secure = TRUE;
         /** @var $saltingObject \TYPO3\CMS\Saltedpasswords\Salt\SaltInterface */
         $saltingObject = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance($row['password']);
         if (is_object($saltingObject)) {
             if ($saltingObject->checkPassword('password', $row['password'])) {
                 $secure = FALSE;
             }
         }
         // Check against plain MD5
         if ($row['password'] === '5f4dcc3b5aa765d61d8327deb882cf99') {
             $secure = FALSE;
         }
         if (!$secure) {
             $value = $GLOBALS['LANG']->getLL('status_insecure');
             $severity = \TYPO3\CMS\Reports\Status::ERROR;
             $editUserAccountUrl = BackendUtility::getModuleUrl('record_edit', array('edit[be_users][' . $row['uid'] . ']' => 'edit', 'returnUrl' => BackendUtility::getModuleUrl('system_ReportsTxreportsm1')));
             $message = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:warning.backend_admin'), '<a href="' . htmlspecialchars($editUserAccountUrl) . '">', '</a>');
         }
     }
     $GLOBALS['TYPO3_DB']->sql_free_result($res);
     return GeneralUtility::makeInstance(\TYPO3\CMS\Reports\Status::class, $GLOBALS['LANG']->getLL('status_adminUserAccount'), $value, $message, $severity);
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:36,代码来源:SecurityStatus.php

示例2: main

 /**
  * MAIN function for page information display
  *
  * @return string Output HTML for the module.
  * @todo Define visibility
  */
 public function main()
 {
     global $BACK_PATH, $LANG, $SOBE;
     $dblist = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\View\\PageLayoutView');
     $dblist->descrTable = '_MOD_' . $GLOBALS['MCONF']['name'];
     $dblist->backPath = $BACK_PATH;
     $dblist->thumbs = 0;
     $dblist->script = BackendUtility::getModuleUrl('web_info');
     $dblist->showIcon = 0;
     $dblist->setLMargin = 0;
     $dblist->agePrefixes = $LANG->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears');
     $dblist->pI_showUser = 1;
     // PAGES:
     $this->pObj->MOD_SETTINGS['pages_levels'] = $this->pObj->MOD_SETTINGS['depth'];
     // ONLY for the sake of dblist module which uses this value.
     $h_func = BackendUtility::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth']);
     $h_func .= BackendUtility::getFuncMenu($this->pObj->id, 'SET[pages]', $this->pObj->MOD_SETTINGS['pages'], $this->pObj->MOD_MENU['pages']);
     $dblist->start($this->pObj->id, 'pages', 0);
     $dblist->generateList();
     // CSH
     $theOutput = $this->pObj->doc->header($LANG->sL('LLL:EXT:cms/web_info/locallang.xlf:page_title'));
     $theOutput .= $this->pObj->doc->section('', BackendUtility::cshItem($dblist->descrTable, 'pagetree_overview', $GLOBALS['BACK_PATH'], '|<br />') . $h_func . $dblist->HTMLcode, 0, 1);
     // Additional footer content
     $footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/web_info/class.tx_cms_webinfo.php']['drawFooterHook'];
     if (is_array($footerContentHook)) {
         foreach ($footerContentHook as $hook) {
             $params = array();
             $theOutput .= \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($hook, $params, $this);
         }
     }
     return $theOutput;
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:38,代码来源:PageInformationController.php

示例3: 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

示例4: manipulateCacheActions

 /**
  * Modifies CacheMenuItems array
  *
  * @param array $cacheActions Array of CacheMenuItems
  * @param array $optionValues Array of AccessConfigurations-identifiers (typically  used by userTS with options.clearCache.identifier)
  *
  * @return void
  */
 public function manipulateCacheActions(&$cacheActions, &$optionValues)
 {
     if ($this->getBackendUser()->getTSConfigVal('options.clearCache.system') || GeneralUtility::getApplicationContext()->isDevelopment() || (bool) $GLOBALS['TYPO3_CONF_VARS']['SYS']['clearCacheSystem'] === TRUE && $this->getBackendUser()->isAdmin()) {
         $cacheActions[] = array('id' => 'dyncss', 'title' => $this->getLanguageService()->sL('LLL:EXT:dyncss/Resources/Private/Language/locallang.xlf:dyncss.toolbar.clearcache.title', TRUE), 'description' => $this->getLanguageService()->sL('LLL:EXT:dyncss/Resources/Private/Language/locallang.xlf:dyncss.toolbar.clearcache.description', TRUE), 'href' => BackendUtility::getModuleUrl('tce_db') . '&vC=' . $this->getBackendUser()->veriCode() . '&cacheCmd=dyncss&ajaxCall=1' . BackendUtility::getUrlToken('tceAction'), 'icon' => IconUtility::getSpriteIcon('extensions-dyncss-lightning-blue'));
         $optionValues[] = 'dyncss';
     }
 }
开发者ID:johannessteu,项目名称:TYPO3.dyncss,代码行数:15,代码来源:ClearCacheActionsHook.php

示例5: main

    /**
     * Main function.
     * Creates the header code in XHTML, the JavaScript, then the frameset for the two frames.
     *
     * @return void
     */
    public function main()
    {
        // Setting GPvars:
        $mode = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('mode');
        $bparams = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('bparams');
        $moduleUrl = BackendUtility::getModuleUrl('wizard_element_browser') . '&mode=';
        // Set doktype:
        $GLOBALS['TBE_TEMPLATE']->docType = 'xhtml_frames';
        $GLOBALS['TBE_TEMPLATE']->JScode = $GLOBALS['TBE_TEMPLATE']->wrapScriptTags('
				function closing() {	//
					close();
				}
				function setParams(mode,params) {	//
					parent.content.location.href = ' . GeneralUtility::quoteJSvalue($moduleUrl) . '+mode+"&bparams="+params;
				}
				if (!window.opener) {
					alert("ERROR: Sorry, no link to main window... Closing");
					close();
				}
		');
        $this->content .= $GLOBALS['TBE_TEMPLATE']->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:TYPO3_Element_Browser'));
        // URL for the inner main frame:
        $url = $GLOBALS['BACK_PATH'] . $moduleUrl . rawurlencode($mode) . '&bparams=' . rawurlencode($bparams);
        // Create the frameset for the window:
        // Formerly there were a ' onunload="closing();"' in the <frameset> tag - but it failed on Safari browser on Mac unless the handler was "onUnload"
        $this->content .= '
			<frameset rows="*,1" framespacing="0" frameborder="0" border="0">
				<frame name="content" src="' . htmlspecialchars($url) . '" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />
				<frame name="menu" src="' . $GLOBALS['BACK_PATH'] . 'dummy.php" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />
			</frameset>
		';
        $this->content .= '
</html>';
    }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:40,代码来源:ElementBrowserFramesetController.php

示例6: main

 /**
  * MAIN function for static publishing information
  *
  * @return    string        Output HTML for the module.
  */
 public function main()
 {
     // Handle actions:
     $this->handleActions();
     $this->pageId = intval($this->pObj->id);
     // Initialize tree object:
     /* @var $tree BrowseTreeView */
     $tree = GeneralUtility::makeInstance(BrowseTreeView::class);
     $tree->makeHTML = 2;
     $tree->init();
     // Set starting page Id of tree (overrides webmounts):
     if ($this->pageId > 0) {
         $tree->MOUNTS = [0 => $this->pageId];
     }
     $tree->ext_IconMode = true;
     $tree->showDefaultTitleAttribute = true;
     $tree->thisScript = BackendUtility::getModuleUrl(GeneralUtility::_GP('M'));
     if (is_callable([$tree, 'setTreeName'])) {
         $tree->setTreeName('staticfilecache');
     } else {
         $tree->treeName = 'staticfilecache';
     }
     // Creating top icon; the current page
     $tree->getBrowsableTree();
     // Render information table:
     return $this->processExpandCollapseLinks($this->renderModule($tree));
 }
开发者ID:qbus-agentur,项目名称:nc_staticfilecache,代码行数:32,代码来源:CacheModule.php

示例7: manipulateCacheActions

 /**
  * Modifies CacheMenuItems array
  *
  * @param array $cacheActions Array of CacheMenuItems
  * @param array $optionValues Array of AccessConfigurations-identifiers (typically  used by userTS with options.clearCache.identifier)
  */
 public function manipulateCacheActions(&$cacheActions, &$optionValues)
 {
     if ($this->getBackendUser()->getTSConfigVal('options.clearCache.system') || GeneralUtility::getApplicationContext()->isDevelopment() || (bool) $GLOBALS['TYPO3_CONF_VARS']['SYS']['clearCacheSystem'] === TRUE && $this->getBackendUser()->isAdmin()) {
         $cacheActions[] = array('id' => 'dyncss', 'title' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesTitle', TRUE), 'description' => $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesDescription', TRUE), 'href' => BackendUtility::getModuleUrl('tce_db') . '&vC=' . $this->getBackendUser()->veriCode() . '&cacheCmd=dyncss&ajaxCall=1' . BackendUtility::getUrlToken('tceAction'), 'icon' => IconUtility::getSpriteIcon('actions-system-cache-clear-impact-high'));
         $optionValues[] = 'dyncss';
     }
 }
开发者ID:blumenbach,项目名称:bb-online.neu,代码行数:13,代码来源:ClearCacheActionsHook.php

示例8: main

 /**
  * Main function, adding the item to input menuItems array
  *
  * @param ClickMenu $backRef References to parent clickmenu objects.
  * @param array $menuItems Array of existing menu items accumulated. New element added to this.
  * @param string $table Table name of the element
  * @param int $uid Record UID of the element
  * @return array Modified menuItems array
  */
 public function main(&$backRef, $menuItems, $table, $uid)
 {
     $localItems = array();
     if (!$backRef->cmLevel && $uid > 0 && $GLOBALS['BE_USER']->check('modules', 'web_txversionM1')) {
         // Returns directly, because the clicked item was not from the pages table
         if (in_array('versioning', $backRef->disabledItems) || !$GLOBALS['TCA'][$table] || !$GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
             return $menuItems;
         }
         // Adds the regular item
         $LL = $this->includeLL();
         // "Versioning" element added:
         $url = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_txversionM1', array('table' => $table, 'uid' => $uid));
         $localItems[] = $backRef->linkItem($GLOBALS['LANG']->getLLL('title', $LL), $backRef->excludeIcon('<img src="' . $backRef->backPath . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('version') . 'Resources/Public/Icons/module-version.png" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), TRUE);
         // Find position of "delete" element:
         $c = 0;
         foreach ($menuItems as $k => $value) {
             $c++;
             if ($k === 'delete') {
                 break;
             }
         }
         // .. subtract two (delete item + divider line)
         $c -= 2;
         // ... and insert the items just before the delete element.
         array_splice($menuItems, $c, 0, $localItems);
     }
     return $menuItems;
 }
开发者ID:adrolli,项目名称:TYPO3.CMS,代码行数:37,代码来源:VersionClickMenu.php

示例9: initializeAction

 /**
  * Initializes the controller before invoking an action method.
  *
  * @return void
  */
 protected function initializeAction()
 {
     parent::initializeAction();
     $this->stageService = GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\StagesService');
     $this->workspaceService = GeneralUtility::makeInstance('TYPO3\\CMS\\Workspaces\\Service\\WorkspaceService');
     $this->template->setExtDirectStateProvider();
     $resourcePath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('workspaces') . 'Resources/Public/StyleSheet/preview.css';
     $GLOBALS['TBE_STYLES']['extJS']['theme'] = $resourcePath;
     $this->pageRenderer->loadExtJS();
     $this->pageRenderer->enableExtJSQuickTips();
     // Load  JavaScript:
     $this->pageRenderer->addExtDirectCode(array('TYPO3.Workspaces', 'TYPO3.ExtDirectStateProvider'));
     $states = $GLOBALS['BE_USER']->uc['moduleData']['Workspaces']['States'];
     $this->pageRenderer->addInlineSetting('Workspaces', 'States', $states);
     $this->pageRenderer->addJsFile($this->backPath . 'sysext/backend/Resources/Public/JavaScript/notifications.js');
     $this->pageRenderer->addJsFile($this->backPath . 'sysext/backend/Resources/Public/JavaScript/flashmessages.js');
     $this->pageRenderer->addJsFile($this->backPath . 'sysext/backend/Resources/Public/JavaScript/iframepanel.js');
     $resourcePathJavaScript = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('workspaces') . 'Resources/Public/JavaScript/';
     $jsFiles = array('Ext.ux.plugins.TabStripContainer.js', 'Store/mainstore.js', 'helpers.js', 'actions.js');
     foreach ($jsFiles as $jsFile) {
         $this->pageRenderer->addJsFile($resourcePathJavaScript . $jsFile);
     }
     $this->pageRenderer->addInlineSetting('RecordHistory', 'moduleUrl', BackendUtility::getModuleUrl('record_history'));
     // todo this part should be done with inlineLocallanglabels
     $this->pageRenderer->addJsInlineCode('workspace-inline-code', $this->generateJavascript());
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:31,代码来源:PreviewController.php

示例10: __construct

 /**
  * Constructor
  *
  * @throws \UnexpectedValueException
  */
 public function __construct()
 {
     $backendUser = $this->getBackendUser();
     $languageService = $this->getLanguageService();
     $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
     $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/Toolbar/ClearCacheMenu');
     // Clear all page-related caches
     if ($backendUser->isAdmin() || $backendUser->getTSConfigVal('options.clearCache.pages')) {
         $this->cacheActions[] = array('id' => 'pages', 'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesTitle', true), 'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushPageCachesDescription', true), 'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'pages', 'ajaxCall' => 1]), 'icon' => $this->iconFactory->getIcon('actions-system-cache-clear-impact-low', Icon::SIZE_SMALL)->render());
         $this->optionValues[] = 'pages';
     }
     // Clear cache for ALL tables!
     if ($backendUser->isAdmin() || $backendUser->getTSConfigVal('options.clearCache.all')) {
         $this->cacheActions[] = array('id' => 'all', 'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushGeneralCachesTitle', true), 'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushGeneralCachesDescription', true), 'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'all', 'ajaxCall' => 1]), 'icon' => $this->iconFactory->getIcon('actions-system-cache-clear-impact-medium', Icon::SIZE_SMALL)->render());
         $this->optionValues[] = 'all';
     }
     // Clearing of system cache (core cache, class cache etc)
     // is only shown explicitly if activated for a BE-user (not activated for admins by default)
     // or if the system runs in development mode
     // or if $GLOBALS['TYPO3_CONF_VARS']['SYS']['clearCacheSystem'] is set (only for admins)
     if ($backendUser->getTSConfigVal('options.clearCache.system') || GeneralUtility::getApplicationContext()->isDevelopment() || (bool) $GLOBALS['TYPO3_CONF_VARS']['SYS']['clearCacheSystem'] === true && $backendUser->isAdmin()) {
         $this->cacheActions[] = array('id' => 'system', 'title' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesTitle', true), 'description' => $languageService->sL('LLL:EXT:lang/locallang_core.xlf:flushSystemCachesDescription', true), 'href' => BackendUtility::getModuleUrl('tce_db', ['vC' => $backendUser->veriCode(), 'cacheCmd' => 'system', 'ajaxCall' => 1]), 'icon' => $this->iconFactory->getIcon('actions-system-cache-clear-impact-high', Icon::SIZE_SMALL)->render());
         $this->optionValues[] = 'system';
     }
     // Hook for manipulating cacheActions
     if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'])) {
         foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['additionalBackendItems']['cacheActions'] as $cacheAction) {
             $hookObject = GeneralUtility::getUserObj($cacheAction);
             if (!$hookObject instanceof ClearCacheActionsHookInterface) {
                 throw new \UnexpectedValueException('$hookObject must implement interface ' . ClearCacheActionsHookInterface::class, 1228262000);
             }
             $hookObject->manipulateCacheActions($this->cacheActions, $this->optionValues);
         }
     }
 }
开发者ID:graurus,项目名称:testgit_t37,代码行数:40,代码来源:ClearCacheToolbarItem.php

示例11: displayMessage

 /**
  * Displaying a message to click the update in the extension config
  *
  * @return string    $out: the html message
  */
 public static function displayMessage()
 {
     $parameters = array('tx_extensionmanager_tools_extensionmanagerextensionmanager[extensionKey]' => 'direct_mail', 'tx_extensionmanager_tools_extensionmanagerextensionmanager[action]' => 'show', 'tx_extensionmanager_tools_extensionmanagerextensionmanager[controller]' => 'UpdateScript');
     $link = BackendUtility::getModuleUrl('tools_ExtensionmanagerExtensionmanager', $parameters);
     $out = "\n\t\t<div style=\"position:absolute;top:10px;right:10px; width:300px;\">\n\t\t\t<div class=\"typo3-message message-information\">\n\t\t\t\t\t<div class=\"message-header\">" . $GLOBALS['LANG']->sL('LLL:EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xml:update_optionHeader') . "</div>\n\t\t\t\t\t<div class=\"message-body\">\n\t\t\t\t\t\t" . $GLOBALS['LANG']->sL("LLL:EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xml:update_optionMsg") . "<br />\n\t\t\t\t\t\t<a style=\"text-decoration:underline;\" href=\"" . $link . "\">\n\t\t\t\t\t\t" . $GLOBALS['LANG']->sL("LLL:EXT:direct_mail/Resources/Private/Language/locallang_mod2-6.xml:update_optionLink") . "</a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t";
     return $out;
 }
开发者ID:Teddytrombone,项目名称:direct_mail,代码行数:12,代码来源:TsParserExt.php

示例12: init

 /**
  * Initialize
  *
  * @return 	void
  */
 protected function init()
 {
     // Initialize GPvars:
     $this->target = GeneralUtility::_GP('target');
     $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
     if (!$this->returnUrl) {
         $this->returnUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . BackendUtility::getModuleUrl('file_list') . '&id=' . rawurlencode($this->target);
     }
     // Create the folder object
     if ($this->target) {
         $this->folderObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->target);
     }
     if ($this->folderObject->getStorage()->getUid() === 0) {
         throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException('You are not allowed to access folders outside your storages', 1375889834);
     }
     // Cleaning and checking target directory
     if (!$this->folderObject) {
         $title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:paramError', TRUE);
         $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir', TRUE);
         throw new \RuntimeException($title . ': ' . $message, 1294586843);
     }
     // Setting the title and the icon
     $icon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-filetree-root');
     $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) . ': ' . htmlspecialchars($this->folderObject->getIdentifier());
     // Setting template object
     $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/file_upload.html');
     $this->doc->backPath = $GLOBALS['BACK_PATH'];
     $this->doc->form = '<form action="tce_file.php" method="post" name="editform" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '">';
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:35,代码来源:FileUploadController.php

示例13: getLoginScripts

 /**
  * Provides form code and javascript for the user setup.
  *
  * @param array $parameters Parameters to the script
  * @param \TYPO3\CMS\Setup\Controller\SetupModuleController $userSetupObject Calling object: user setup module
  * @return string The code for the user setup
  */
 public function getLoginScripts(array $parameters, \TYPO3\CMS\Setup\Controller\SetupModuleController $userSetupObject)
 {
     $content = '';
     if ($this->isRsaAvailable()) {
         // If we can get the backend, we can proceed
         $backend = \TYPO3\CMS\Rsaauth\Backend\BackendFactory::getBackend();
         $javascriptPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('rsaauth') . 'resources/';
         $files = array('jsbn/jsbn.js', 'jsbn/prng4.js', 'jsbn/rng.js', 'jsbn/rsa.js', 'jsbn/base64.js', 'rsaauth_min.js');
         $content = '';
         foreach ($files as $file) {
             $content .= '<script type="text/javascript" src="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $javascriptPath . $file . '"></script>';
         }
         // Generate a new key pair
         $keyPair = $backend->createNewKeyPair();
         // Save private key
         $storage = \TYPO3\CMS\Rsaauth\Storage\StorageFactory::getStorage();
         /** @var $storage \TYPO3\CMS\Rsaauth\Storage\AbstractStorage */
         $storage->put($keyPair->getPrivateKey());
         // Add form tag
         $form = '<form action="' . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('user_setup') . '" method="post" name="usersetup" enctype="application/x-www-form-urlencoded" onsubmit="tx_rsaauth_encryptUserSetup();">';
         // Add RSA hidden fields
         $form .= '<input type="hidden" id="rsa_n" name="n" value="' . htmlspecialchars($keyPair->getPublicKeyModulus()) . '" />';
         $form .= '<input type="hidden" id="rsa_e" name="e" value="' . sprintf('%x', $keyPair->getExponent()) . '" />';
         $userSetupObject->doc->form = $form;
     }
     return $content;
 }
开发者ID:khanhdeux,项目名称:typo3test,代码行数:34,代码来源:UserSetupHook.php

示例14: indexAction

 /**
  * Generates the index file for the admin interface.
  */
 public function indexAction()
 {
     $cssHeader = '';
     $abslen = strlen(PATH_site);
     $langid = $this->getContext()->getLocale()->getLanguageId();
     $controller = $this->getController();
     foreach (Base::getAimeos()->getCustomPaths('client/extjs') as $base => $paths) {
         $relJsbPath = '../' . substr($base, $abslen);
         foreach ($paths as $path) {
             $jsbAbsPath = $base . '/' . $path;
             if (!is_file($jsbAbsPath)) {
                 throw new \Exception(sprintf('JSB2 file "%1$s" not found', $jsbAbsPath));
             }
             $jsb2 = new \Aimeos\MW\Jsb2\Standard($jsbAbsPath, $relJsbPath . '/' . dirname($path));
             $cssHeader .= $jsb2->getHtml('css');
         }
     }
     // rawurldecode() is necessary for ExtJS templates to replace "{site}" properly
     $urlTemplate = rawurldecode(BackendUtility::getModuleUrl($this->request->getPluginName(), array('tx_aimeos_web_aimeostxaimeosadmin' => array('site' => '{site}', 'tab' => '{tab}'))));
     $serviceUrl = BackendUtility::getModuleUrl($this->request->getPluginName(), array('tx_aimeos_web_aimeostxaimeosadmin' => array('controller' => 'Admin', 'action' => 'do')));
     $this->view->assign('cssHeader', $cssHeader);
     $this->view->assign('lang', $langid);
     $this->view->assign('i18nContent', $this->getJsonClientI18n($langid));
     $this->view->assign('config', $this->getJsonClientConfig());
     $this->view->assign('site', $this->getSite($this->request));
     $this->view->assign('smd', $controller->getJsonSmd($serviceUrl));
     $this->view->assign('itemSchemas', $controller->getJsonItemSchemas());
     $this->view->assign('searchSchemas', $controller->getJsonSearchSchemas());
     $this->view->assign('activeTab', $this->request->hasArgument('tab') ? (int) $this->request->getArgument('tab') : 0);
     $this->view->assign('version', $this->getVersion());
     $this->view->assign('urlTemplate', $urlTemplate);
 }
开发者ID:batisteo,项目名称:aimeos-typo3,代码行数:35,代码来源:AdminController.php

示例15: main

    /**
     * Main function.
     * Creates the header code in XHTML, the JavaScript, then the frameset for the two frames.
     *
     * @return void
     */
    public function main()
    {
        // Setting GPvars:
        $mode = GeneralUtility::_GP('mode');
        $bparams = GeneralUtility::_GP('bparams');
        $moduleUrl = BackendUtility::getModuleUrl('wizard_element_browser') . '&mode=';
        $documentTemplate = $this->getDocumentTemplate();
        $documentTemplate->JScode = $documentTemplate->wrapScriptTags('
				function closing() {	//
					close();
				}
				function setParams(mode,params) {	//
					parent.content.location.href = ' . GeneralUtility::quoteJSvalue($moduleUrl) . '+mode+"&bparams="+params;
				}
				if (!window.opener) {
					alert("ERROR: Sorry, no link to main window... Closing");
					close();
				}
		');
        // build the header part
        $documentTemplate->startPage($this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:TYPO3_Element_Browser'));
        // URL for the inner main frame:
        $url = $GLOBALS['BACK_PATH'] . $moduleUrl . rawurlencode($mode) . '&bparams=' . rawurlencode($bparams);
        // Create the frameset for the window
        // Formerly there were a ' onunload="closing();"' in the <frameset> tag - but it failed on Safari browser on Mac unless the handler was "onUnload"
        $this->content = $documentTemplate->getPageRenderer()->render(PageRenderer::PART_HEADER) . '<frameset rows="*,1" framespacing="0" frameborder="0" border="0">
				<frame name="content" src="' . htmlspecialchars($url) . '" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" noresize="noresize" />
				<frame name="menu" src="' . htmlspecialchars(BackendUtility::getModuleUrl('dummy')) . '" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" noresize="noresize" />
			</frameset>
		</html>
		';
    }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:38,代码来源:ElementBrowserFramesetController.php


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