本文整理汇总了PHP中TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck方法的典型用法代码示例。如果您正苦于以下问题:PHP BackendUtility::getFuncCheck方法的具体用法?PHP BackendUtility::getFuncCheck怎么用?PHP BackendUtility::getFuncCheck使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Utility\BackendUtility
的用法示例。
在下文中一共展示了BackendUtility::getFuncCheck方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
/**
* Calls showStats to generate output.
*
* @return string html table with results from showStats()
* @todo Define visibility
*/
public function main()
{
// Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
$theOutput = $this->pObj->doc->header($GLOBALS['LANG']->getLL('title'));
$theOutput .= $this->pObj->doc->section('', $this->showStats(), 0, 1);
$menu = array();
$functionMenu = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[tx_indexedsearch_modfunc2_check]', $this->pObj->MOD_SETTINGS['tx_indexedsearch_modfunc2_check'], '', '', 'id="checkTx_indexedsearch_modfunc2_check"');
$menu[] = $functionMenu . '<label for="checkTx_indexedsearch_modfunc2_check"' . $GLOBALS['LANG']->getLL('checklabel') . '</label>';
$theOutput .= $this->pObj->doc->spacer(5);
return $theOutput;
}
示例2: main
/**
* MAIN function for cache information
*
* @return string Output HTML for the module.
*/
public function main()
{
$content = '';
// specific language selection from form
$depth = $this->pObj->MOD_SETTINGS['depth'];
$langOnly = $this->pObj->MOD_SETTINGS['lang'];
if ($langOnly != '' && $langOnly != '-1') {
$this->langOnly = (int) $langOnly;
}
$id = (int) $this->pObj->id;
if ($id) {
// Add CSS
$this->pObj->content = str_replace('/*###POSTCSSMARKER###*/', '
TABLE.c-list TR TD { white-space: nowrap; vertical-align: top; }
TABLE#tx-seobasics TD { vertical-align: top; }
', $this->pObj->content);
// Add Javascript
$this->pObj->doc->getPageRenderer()->loadJquery();
$this->pObj->doc->getPageRenderer()->addJsFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('seo_basics') . 'Resources/Public/JavaScript/SeoModule.js');
// render depth selector
$content = BackendUtility::getFuncMenu($id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth']);
// if there are multiple languages, show dropdown to narrow it down.
if ($this->hasAvailableLanguages) {
$content .= 'Display only language: ';
$content .= BackendUtility::getFuncMenu($id, 'SET[lang]', $this->pObj->MOD_SETTINGS['lang'], $this->pObj->MOD_MENU['lang'], 'index.php') . '<br/>';
}
$content .= BackendUtility::getFuncCheck($id, 'SET[hideShortcuts]', $this->pObj->MOD_SETTINGS['hideShortcuts'], '', '', 'id="SET[hideShortcuts]"');
$content .= '<label for="SET[hideShortcuts]">Hide Shortcuts</label> ';
$content .= BackendUtility::getFuncCheck($id, 'SET[hideDisabled]', $this->pObj->MOD_SETTINGS['hideDisabled'], '', '', 'id="SET[hideDisabled]"');
$content .= '<label for="SET[hideDisabled]">Hide Disabled Pages</label> <br/>';
$content .= BackendUtility::getFuncCheck($id, 'SET[hideSysFolders]', $this->pObj->MOD_SETTINGS['hideSysFolders'], '', '', 'id="SET[hideSysFolders]"');
$content .= '<label for="SET[hideSysfolders]">Hide System Folders</label> <br/>';
$content .= BackendUtility::getFuncCheck($id, 'SET[hideNotInMenu]', $this->pObj->MOD_SETTINGS['hideNotInMenu'], '', '', 'id="SET[hideNotInMenu]"');
$content .= '<label for="SET[hideNotInMenu]">Hide Not in menu</label> <br/>';
// Save previous editing when submit was hit
$this->saveChanges();
// == Showing the tree ==
// Initialize starting point (= $id) of page tree
$treeStartingRecord = BackendUtility::getRecord('pages', $id);
BackendUtility::workspaceOL('pages', $treeStartingRecord);
// Initialize tree object
$tree = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\View\\PageTreeView');
$tree->addField('tx_seo_titletag', 1);
$tree->addField('keywords', 1);
$tree->addField('description', 1);
$tree->addField('tx_realurl_pathsegment', 1);
$tree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
// Creating top icon; the current page
$HTML = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $treeStartingRecord);
$tree->tree[] = array('row' => $treeStartingRecord, 'HTML' => $HTML);
// Create the tree from starting point
if ($depth > 0) {
$tree->getTree($id, $depth, '');
}
// get all page IDs that will be displayed
$pages = array();
foreach ($tree->tree as $row) {
$pages[] = $row['row']['uid'];
}
// load language overlays and path cache for all pages shown
$uidList = $GLOBALS['TYPO3_DB']->cleanIntList(implode(',', $pages));
$this->loadLanguageOverlays($uidList);
$this->loadPathCache($uidList);
// Render information table
$content .= $this->renderSaveButtons();
$content .= $this->renderSEOTable($tree);
$content .= $this->renderSaveButtons();
}
return $content;
}
示例3: getBulkSelector
/**
* Get the HTML data required for a bulk selection of files of the TYPO3 Element Browser.
*
* @param int $filesCount Number of files currently displayed
* @return string HTML data required for a bulk selection of files - if $filesCount is 0, nothing is returned
*/
protected function getBulkSelector($filesCount)
{
if (!$filesCount) {
return '';
}
$lang = $this->getLanguageService();
$out = '';
// Getting flag for showing/not showing thumbnails:
$noThumbsInEB = $this->getBackendUser()->getTSConfigVal('options.noThumbsInEB');
if (!$noThumbsInEB && $this->selectedFolder) {
// MENU-ITEMS, fetching the setting for thumbnails from File>List module:
$_MOD_MENU = array('displayThumbs' => '');
$_MCONF['name'] = 'file_list';
$_MOD_SETTINGS = BackendUtility::getModuleData($_MOD_MENU, GeneralUtility::_GP('SET'), $_MCONF['name']);
$addParams = GeneralUtility::implodeArrayForUrl('', $this->getUrlParameters(['identifier' => $this->selectedFolder->getCombinedIdentifier()]));
$thumbNailCheck = '<div class="checkbox" style="padding:5px 0 15px 0"><label for="checkDisplayThumbs">' . BackendUtility::getFuncCheck('', 'SET[displayThumbs]', $_MOD_SETTINGS['displayThumbs'], $this->thisScript, $addParams, 'id="checkDisplayThumbs"') . $lang->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:displayThumbs', true) . '</label></div>';
$out .= $thumbNailCheck;
} else {
$out .= '<div style="padding-top: 15px;"></div>';
}
return $out;
}
示例4: main
/**
* Main
*
* @return string
* @todo Define visibility
*/
public function main()
{
$theOutput = '';
// Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
// Checking for more than one template an if, set a menu...
$manyTemplatesMenu = $this->pObj->templateMenu();
$template_uid = 0;
if ($manyTemplatesMenu) {
$template_uid = $this->pObj->MOD_SETTINGS['templatesOnPage'];
}
// BUGBUG: Should we check if the uset may at all read and write template-records???
$existTemplate = $this->initialize_editor($this->pObj->id, $template_uid);
// initialize
if ($existTemplate) {
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('currentTemplate', TRUE), \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_template', $GLOBALS['tplRow']) . '<strong>' . $this->pObj->linkWrapTemplateTitle($GLOBALS['tplRow']['title']) . '</strong>' . htmlspecialchars(trim($GLOBALS['tplRow']['sitetitle']) ? ' (' . $GLOBALS['tplRow']['sitetitle'] . ')' : ''));
}
if ($manyTemplatesMenu) {
$theOutput .= $this->pObj->doc->section('', $manyTemplatesMenu);
}
$GLOBALS['tmpl']->clearList_const_temp = array_flip($GLOBALS['tmpl']->clearList_const);
$GLOBALS['tmpl']->clearList_setup_temp = array_flip($GLOBALS['tmpl']->clearList_setup);
$pointer = count($GLOBALS['tmpl']->hierarchyInfo);
$hierarchyInfo = $GLOBALS['tmpl']->ext_process_hierarchyInfo(array(), $pointer);
$head = '<thead><tr>';
$head .= '<th>' . $GLOBALS['LANG']->getLL('title', TRUE) . '</th>';
$head .= '<th>' . $GLOBALS['LANG']->getLL('rootlevel', TRUE) . '</th>';
$head .= '<th>' . $GLOBALS['LANG']->getLL('clearSetup', TRUE) . '</th>';
$head .= '<th>' . $GLOBALS['LANG']->getLL('clearConstants', TRUE) . '</th>';
$head .= '<th>' . $GLOBALS['LANG']->getLL('pid', TRUE) . '</th>';
$head .= '<th>' . $GLOBALS['LANG']->getLL('rootline', TRUE) . '</th>';
$head .= '<th>' . $GLOBALS['LANG']->getLL('nextLevel', TRUE) . '</th>';
$head .= '</tr></thead>';
$hierar = implode(array_reverse($GLOBALS['tmpl']->ext_getTemplateHierarchyArr($hierarchyInfo, '', array(), 1)), '');
$hierar = '<table class="t3-table" id="ts-analyzer">' . $head . $hierar . '</table>';
$theOutput .= $this->pObj->doc->spacer(5);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('templateHierarchy', TRUE), $hierar, 0, 1);
$urlParameters = array('id' => $GLOBALS['SOBE']->id, 'template' => 'all');
$aHref = \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_ts', $urlParameters);
$completeLink = '<p><a href="' . htmlspecialchars($aHref) . '" class="t3-button">' . $GLOBALS['LANG']->getLL('viewCompleteTS', TRUE) . '</a></p>';
$theOutput .= $this->pObj->doc->spacer(5);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('completeTS', TRUE), $completeLink, 0, 1);
$theOutput .= $this->pObj->doc->spacer(15);
// Output options
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('displayOptions', TRUE), '', FALSE, TRUE);
$addParams = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('template') ? '&template=' . \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('template') : '';
$theOutput .= '<div class="tst-analyzer-options">' . '<div class="checkbox"><label for="checkTs_analyzer_checkLinenum">' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_analyzer_checkLinenum]', $this->pObj->MOD_SETTINGS['ts_analyzer_checkLinenum'], '', $addParams, 'id="checkTs_analyzer_checkLinenum"') . $GLOBALS['LANG']->getLL('lineNumbers', TRUE) . '</label></div>' . '<div class="checkbox"><label for="checkTs_analyzer_checkSyntax">' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_analyzer_checkSyntax]', $this->pObj->MOD_SETTINGS['ts_analyzer_checkSyntax'], '', $addParams, 'id="checkTs_analyzer_checkSyntax"') . $GLOBALS['LANG']->getLL('syntaxHighlight', TRUE) . '</label> ' . '</label></div>';
if (!$this->pObj->MOD_SETTINGS['ts_analyzer_checkSyntax']) {
$theOutput .= '<div class="checkbox"><label for="checkTs_analyzer_checkComments">' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_analyzer_checkComments]', $this->pObj->MOD_SETTINGS['ts_analyzer_checkComments'], '', $addParams, 'id="checkTs_analyzer_checkComments"') . $GLOBALS['LANG']->getLL('comments', TRUE) . '</label></div>' . '<div class="checkbox"><label for="checkTs_analyzer_checkCrop">' . \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_analyzer_checkCrop]', $this->pObj->MOD_SETTINGS['ts_analyzer_checkCrop'], '', $addParams, 'id="checkTs_analyzer_checkCrop"') . $GLOBALS['LANG']->getLL('cropLines', TRUE) . '</label></div>';
}
$theOutput .= '</div>';
$theOutput .= $this->pObj->doc->spacer(25);
// Output Constants
if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('template')) {
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('constants', TRUE), '', 0, 1);
$theOutput .= $this->pObj->doc->sectionEnd();
$theOutput .= '
<table class="t3-table ts-typoscript">
';
// Don't know why -2 and not 0... :-) But works.
$GLOBALS['tmpl']->ext_lineNumberOffset = 0;
$GLOBALS['tmpl']->ext_lineNumberOffset_mode = 'const';
foreach ($GLOBALS['tmpl']->constants as $key => $val) {
$currentTemplateId = $GLOBALS['tmpl']->hierarchyInfo[$key]['templateID'];
if ($currentTemplateId == \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('template') || \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('template') == 'all') {
$theOutput .= '
<tr>
<td><strong>' . htmlspecialchars($GLOBALS['tmpl']->hierarchyInfo[$key]['title']) . '</strong></td>
</tr>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td nowrap="nowrap">' . $GLOBALS['tmpl']->ext_outputTS(array($val), $this->pObj->MOD_SETTINGS['ts_analyzer_checkLinenum'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkComments'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkCrop'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkSyntax'], 0) . '</td></tr></table>
</td>
</tr>
';
if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('template') != 'all') {
break;
}
}
$GLOBALS['tmpl']->ext_lineNumberOffset += count(explode(LF, $val)) + 1;
}
$theOutput .= '
</table>
';
}
// Output setup
if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('template')) {
$theOutput .= $this->pObj->doc->spacer(15);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('setup', TRUE), '', 0, 1);
$theOutput .= $this->pObj->doc->sectionEnd();
$theOutput .= '
<table class="t3-table ts-typoscript">
';
$GLOBALS['tmpl']->ext_lineNumberOffset = 0;
$GLOBALS['tmpl']->ext_lineNumberOffset_mode = 'setup';
//.........这里部分代码省略.........
示例5: main
/**
* Main function
*
* @return void
*/
public function main()
{
/** @var ArrayBrowser $arrayBrowser */
$arrayBrowser = GeneralUtility::makeInstance(ArrayBrowser::class);
$label = $this->MOD_MENU['function'][$this->MOD_SETTINGS['function']];
$search_field = GeneralUtility::_GP('search_field');
$templatePathAndFilename = GeneralUtility::getFileAbsFileName('EXT:lowlevel/Resources/Private/Templates/Backend/Configuration.html');
$this->view->setTemplatePathAndFilename($templatePathAndFilename);
$this->view->assign('label', $label);
$this->view->assign('search_field', $search_field);
$this->view->assign('checkbox_checkRegexsearch', BackendUtility::getFuncCheck(0, 'SET[regexsearch]', $this->MOD_SETTINGS['regexsearch'], '', '', 'id="checkRegexsearch"'));
switch ($this->MOD_SETTINGS['function']) {
case 0:
$theVar = $GLOBALS['TYPO3_CONF_VARS'];
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TYPO3_CONF_VARS';
break;
case 1:
$theVar = $GLOBALS['TCA'];
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TCA';
break;
case 2:
$theVar = $GLOBALS['TCA_DESCR'];
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TCA_DESCR';
break;
case 3:
$theVar = $GLOBALS['TYPO3_LOADED_EXT'];
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TYPO3_LOADED_EXT';
break;
case 4:
$theVar = $GLOBALS['T3_SERVICES'];
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$T3_SERVICES';
break;
case 5:
$theVar = $GLOBALS['TBE_MODULES'];
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TBE_MODULES';
break;
case 6:
$theVar = $GLOBALS['TBE_MODULES_EXT'];
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TBE_MODULES_EXT';
break;
case 7:
$theVar = $GLOBALS['TBE_STYLES'];
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TBE_STYLES';
break;
case 8:
$theVar = $GLOBALS['BE_USER']->uc;
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$BE_USER->uc';
break;
case 9:
$theVar = $GLOBALS['TYPO3_USER_SETTINGS'];
ArrayUtility::naturalKeySortRecursive($theVar);
$arrayBrowser->varName = '$TYPO3_USER_SETTINGS';
break;
default:
$theVar = array();
}
// Update node:
$update = 0;
$node = GeneralUtility::_GET('node');
// If any plus-signs were clicked, it's registered.
if (is_array($node)) {
$this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']] = $arrayBrowser->depthKeys($node, $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']]);
$update = 1;
}
if ($update) {
$this->getBackendUser()->pushModuleData($this->moduleName, $this->MOD_SETTINGS);
}
$arrayBrowser->dontLinkVar = true;
$arrayBrowser->depthKeys = $this->MOD_SETTINGS['node_' . $this->MOD_SETTINGS['function']];
$arrayBrowser->regexMode = $this->MOD_SETTINGS['regexsearch'];
$arrayBrowser->fixedLgd = $this->MOD_SETTINGS['fixedLgd'];
$arrayBrowser->searchKeysToo = true;
// If any POST-vars are send, update the condition array
if (GeneralUtility::_POST('search') && trim($search_field)) {
$arrayBrowser->depthKeys = $arrayBrowser->getSearchKeys($theVar, '', $search_field, array());
}
// mask sensitive information
$varName = trim($arrayBrowser->varName, '$');
if (isset($this->blindedConfigurationOptions[$varName])) {
ArrayUtility::mergeRecursiveWithOverrule($theVar, $this->blindedConfigurationOptions[$varName]);
}
$tree = $arrayBrowser->tree($theVar, '', '');
$this->view->assign('tree', $tree);
// Setting up the shortcut button for docheader
$buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
// Shortcut
//.........这里部分代码省略.........
示例6: renderQuickEdit
//.........这里部分代码省略.........
list($uidVal, $neighborRecordUid, $ex_colPos) = explode('/', $this->eRParts[1]);
if ($uidVal === 'new') {
$command = 'new';
// Page id of this new record
$theUid = $this->id;
if ($neighborRecordUid) {
$theUid = $neighborRecordUid;
}
} else {
$command = 'edit';
$theUid = $uidVal;
// Convert $uidVal to workspace version if any:
$draftRecord = BackendUtility::getWorkspaceVersionOfRecord($beUser->workspace, $tableName, $theUid, 'uid');
if ($draftRecord) {
$theUid = $draftRecord['uid'];
}
}
// @todo: Hack because DatabaseInitializeNewRow reads from _GP directly
$GLOBALS['_GET']['defVals'][$tableName] = array('colPos' => (int) $ex_colPos, 'sys_language_uid' => (int) $this->current_sys_language);
/** @var TcaDatabaseRecord $formDataGroup */
$formDataGroup = GeneralUtility::makeInstance(TcaDatabaseRecord::class);
/** @var FormDataCompiler $formDataCompiler */
$formDataCompiler = GeneralUtility::makeInstance(FormDataCompiler::class, $formDataGroup);
/** @var NodeFactory $nodeFactory */
$nodeFactory = GeneralUtility::makeInstance(NodeFactory::class);
try {
$formDataCompilerInput = ['tableName' => $tableName, 'vanillaUid' => (int) $theUid, 'command' => $command];
$formData = $formDataCompiler->compile($formDataCompilerInput);
if ($command !== 'new') {
BackendUtility::lockRecords($tableName, $formData['databaseRow']['uid'], $tableName === 'tt_content' ? $formData['databaseRow']['pid'] : 0);
}
$formData['renderType'] = 'outerWrapContainer';
$formResult = $nodeFactory->create($formData)->render();
$panel = $formResult['html'];
$formResult['html'] = '';
/** @var FormResultCompiler $formResultCompiler */
$formResultCompiler = GeneralUtility::makeInstance(FormResultCompiler::class);
$formResultCompiler->mergeResult($formResult);
$row = $formData['databaseRow'];
$new_unique_uid = '';
if ($command === 'new') {
$new_unique_uid = $row['uid'];
}
// Add hidden fields:
if ($uidVal == 'new') {
$panel .= '<input type="hidden" name="data[' . $tableName . '][' . $row['uid'] . '][pid]" value="' . $row['pid'] . '" />';
}
$redirect = $uidVal == 'new' ? BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->id, 'new_unique_uid' => $new_unique_uid, 'returnUrl' => $this->returnUrl]) : $this->R_URI;
$panel .= '
<input type="hidden" name="_serialNumber" value="' . md5(microtime()) . '" />
<input type="hidden" name="edit_record" value="' . $edit_record . '" />
<input type="hidden" name="redirect" value="' . htmlspecialchars($redirect) . '" />
';
// Add JavaScript as needed around the form:
$content = $formResultCompiler->JStop() . $panel . $formResultCompiler->printNeededJSFunctions();
// Display "is-locked" message:
if ($command === 'edit') {
$lockInfo = BackendUtility::isRecordLocked($tableName, $formData['databaseRow']['uid']);
if ($lockInfo) {
/** @var \TYPO3\CMS\Core\Messaging\FlashMessage $flashMessage */
$flashMessage = GeneralUtility::makeInstance(FlashMessage::class, htmlspecialchars($lockInfo['msg']), '', FlashMessage::WARNING);
/** @var $flashMessageService \TYPO3\CMS\Core\Messaging\FlashMessageService */
$flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
/** @var $defaultFlashMessageQueue \TYPO3\CMS\Core\Messaging\FlashMessageQueue */
$defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
$defaultFlashMessageQueue->enqueue($flashMessage);
}
}
} catch (AccessDeniedException $e) {
// If no edit access, print error message:
$content = '<h2>' . $lang->getLL('noAccess', true) . '</h2>';
$content .= '<div>' . $lang->getLL('noAccess_msg') . '<br /><br />' . ($beUser->errorMsg ? 'Reason: ' . $beUser->errorMsg . '<br /><br />' : '') . '</div>';
}
} else {
// If no edit access, print error message:
$content = '<h2>' . $lang->getLL('noAccess') . '</h2>';
$content .= '<div>' . $lang->getLL('noAccess_msg') . '</div>';
}
// Element selection matrix:
if ($tableName === 'tt_content' && MathUtility::canBeInterpretedAsInteger($this->eRParts[1])) {
$content .= '<h2>' . $lang->getLL('CEonThisPage') . '</h2>';
// PositionMap
$posMap = GeneralUtility::makeInstance(ContentLayoutPagePositionMap::class);
$posMap->cur_sys_language = $this->current_sys_language;
$content .= $posMap->printContentElementColumns($this->id, $this->eRParts[1], $this->colPosList, $this->MOD_SETTINGS['tt_content_showHidden'], $this->R_URI);
// Toggle hidden ContentElements
$numberOfHiddenElements = $this->getNumberOfHiddenElements();
if ($numberOfHiddenElements) {
$content .= '<div class="checkbox">';
$content .= '<label for="checkTt_content_showHidden">';
$content .= BackendUtility::getFuncCheck($this->id, 'SET[tt_content_showHidden]', $this->MOD_SETTINGS['tt_content_showHidden'], '', '', 'id="checkTt_content_showHidden"');
$content .= !$numberOfHiddenElements ? '<span class="text-muted">' . $lang->getLL('hiddenCE', true) . '</span>' : $lang->getLL('hiddenCE', true) . ' (' . $numberOfHiddenElements . ')';
$content .= '</label>';
$content .= '</div>';
}
// CSH
$content .= BackendUtility::cshItem($this->descrTable, 'quickEdit_selElement');
}
return $content;
}
示例7: main
//.........这里部分代码省略.........
$out = '<a href="' . htmlspecialchars($aHref) . '"><strong>' . $out . '</strong></a>';
$theOutput .= $this->pObj->doc->divider(5);
$theOutput .= $this->pObj->doc->section('', $out);
} else {
$templateService->tsbrowser_depthKeys = $this->pObj->MOD_SETTINGS['tsbrowser_depthKeys_' . $bType];
if (GeneralUtility::_POST('search') && GeneralUtility::_POST('search_field')) {
// If any POST-vars are send, update the condition array
$templateService->tsbrowser_depthKeys = $templateService->ext_getSearchKeys($theSetup, '', GeneralUtility::_POST('search_field'), array());
}
$theOutput .= '
<div class="tsob-menu">
<div class="form-inline">';
if (is_array($this->pObj->MOD_MENU['ts_browser_type']) && count($this->pObj->MOD_MENU['ts_browser_type']) > 1) {
$theOutput .= '
<div class="form-group">
<label class="control-label">' . $lang->getLL('browse') . '</label>' . BackendUtility::getFuncMenu($this->pObj->id, 'SET[ts_browser_type]', $bType, $this->pObj->MOD_MENU['ts_browser_type']) . '
</div>';
}
if (is_array($this->pObj->MOD_MENU['ts_browser_toplevel_' . $bType]) && count($this->pObj->MOD_MENU['ts_browser_toplevel_' . $bType]) > 1) {
$theOutput .= '
<div class="form-group">
<label class="control-label" for="ts_browser_toplevel_' . $bType . '">' . $lang->getLL('objectList') . '</label> ' . BackendUtility::getFuncMenu($this->pObj->id, 'SET[ts_browser_toplevel_' . $bType . ']', $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType], $this->pObj->MOD_MENU['ts_browser_toplevel_' . $bType]) . '
</div>';
}
$theOutput .= '
<div class="form-group">
<label class="control-label" for="search_field">' . $lang->getLL('search') . '</label>
<input class="form-control" type="search" name="search_field" id="search_field" value="' . htmlspecialchars($POST['search_field']) . '"' . $documentTemplate->formWidth(20) . '/>
</div>
<input class="btn btn-default tsob-search-submit" type="submit" name="search" value="' . $lang->sL('LLL:EXT:lang/locallang_common.xlf:search') . '" />
</div>
<div class="checkbox">
<label for="checkTs_browser_regexsearch">
' . BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_browser_regexsearch]', $this->pObj->MOD_SETTINGS['ts_browser_regexsearch'], '', '', 'id="checkTs_browser_regexsearch"') . $lang->getLL('regExp') . '
</label>
</div>
</div>';
$theKey = $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType];
if (!$theKey || !str_replace('-', '', $theKey)) {
$theKey = '';
}
list($theSetup, $theSetupValue) = $templateService->ext_getSetup($theSetup, $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType] ? $this->pObj->MOD_SETTINGS['ts_browser_toplevel_' . $bType] : '');
$tree = $templateService->ext_getObjTree($theSetup, $theKey, '', '', $theSetupValue, $this->pObj->MOD_SETTINGS['ts_browser_alphaSort']);
$tree = $templateService->substituteCMarkers($tree);
$urlParameters = array('id' => $this->pObj->id);
$aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
// Parser Errors:
$pEkey = $bType == 'setup' ? 'config' : 'constants';
if (!empty($templateService->parserErrors[$pEkey])) {
$errMsg = array();
foreach ($templateService->parserErrors[$pEkey] as $inf) {
$errorLink = ' <a href="' . htmlspecialchars($aHref . '&SET[function]=TYPO3\\CMS\\Tstemplate\\Controller\\TemplateAnalyzerModuleFunctionController&template=all&SET[ts_analyzer_checkLinenum]=1#line-' . $inf[2]) . '">' . $lang->getLL('errorShowDetails') . '</a>';
$errMsg[] = $inf[1] . ': ' . $inf[0] . $errorLink;
}
$theOutput .= $this->pObj->doc->spacer(10);
$title = $lang->getLL('errorsWarnings');
$message = '<p>' . implode($errMsg, '<br />') . '</p>';
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:tstemplate/Resources/Private/Templates/InfoBox.html'));
$view->assignMultiple(array('title' => $title, 'message' => $message, 'state' => InfoboxViewHelper::STATE_WARNING));
$theOutput .= $view->render();
}
if (isset($this->pObj->MOD_SETTINGS['ts_browser_TLKeys_' . $bType][$theKey])) {
$remove = '<a href="' . htmlspecialchars($aHref . '&addKey[' . $theKey . ']=0&SET[ts_browser_toplevel_' . $bType . ']=0') . '">' . $lang->getLL('removeKey') . '</a>';
} else {
$remove = '';
开发者ID:adrolli,项目名称:TYPO3.CMS,代码行数:67,代码来源:TypoScriptTemplateObjectBrowserModuleFunctionController.php
示例8: main
//.........这里部分代码省略.........
$content = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_template', $tplRow) . '<strong>' . htmlspecialchars($tplRow['title']) . '</strong>' . htmlspecialchars(trim($tplRow['sitetitle']) ? ' (' . $tplRow['sitetitle'] . ')' : '');
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('templateInformation'), $content, 0, 1);
if ($manyTemplatesMenu) {
$theOutput .= $this->pObj->doc->section('', $manyTemplatesMenu);
}
$theOutput .= $this->pObj->doc->spacer(10);
$numberOfRows = 35;
// If abort pressed, nothing should be edited:
if ($POST['abort'] || \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($POST['abort_x']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($POST['abort_y']) || $POST['saveclose'] || \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($POST['saveclose_x']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($POST['saveclose_y'])) {
unset($e);
}
if ($e['title']) {
$outCode = '<input type="Text" name="data[title]" value="' . htmlspecialchars($tplRow['title']) . '"' . $this->pObj->doc->formWidth() . '>';
$outCode .= '<input type="Hidden" name="e[title]" value="1">';
$theOutput .= $this->pObj->doc->spacer(15);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('title'), $outCode, TRUE);
}
if ($e['sitetitle']) {
$outCode = '<input type="Text" name="data[sitetitle]" value="' . htmlspecialchars($tplRow['sitetitle']) . '"' . $this->pObj->doc->formWidth() . '>';
$outCode .= '<input type="Hidden" name="e[sitetitle]" value="1">';
$theOutput .= $this->pObj->doc->spacer(15);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('sitetitle'), $outCode, TRUE);
}
if ($e['description']) {
$outCode = '<textarea name="data[description]" rows="5" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, '', '') . '>' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatForTextarea($tplRow['description']) . '</textarea>';
$outCode .= '<input type="Hidden" name="e[description]" value="1">';
$theOutput .= $this->pObj->doc->spacer(15);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('description'), $outCode, TRUE);
}
if ($e['constants']) {
$outCode = '<textarea name="data[constants]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatForTextarea($tplRow['constants']) . '</textarea>';
$outCode .= '<input type="Hidden" name="e[constants]" value="1">';
// Display "Include TypoScript file content?" checkbox
$outCode .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[includeTypoScriptFileContent]', $this->pObj->MOD_SETTINGS['includeTypoScriptFileContent'], '', '&e[constants]=1', 'id="checkIncludeTypoScriptFileContent"');
$outCode .= '<label for="checkIncludeTypoScriptFileContent">' . $GLOBALS['LANG']->getLL('includeTypoScriptFileContent') . '</label><br />';
$theOutput .= $this->pObj->doc->spacer(15);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('constants'), '', TRUE);
$theOutput .= $this->pObj->doc->sectionEnd() . $outCode;
}
if ($e['file']) {
$path = PATH_site . $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['uploadfolder'] . '/' . $e[file];
$fI = \TYPO3\CMS\Core\Utility\GeneralUtility::split_fileref($e[file]);
if (@is_file($path) && \TYPO3\CMS\Core\Utility\GeneralUtility::inList($this->pObj->textExtensions, $fI['fileext'])) {
if (filesize($path) < $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['max_size'] * 1024) {
$fileContent = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($path);
$outCode = $GLOBALS['LANG']->getLL('file') . ' <strong>' . $e[file] . '</strong><BR>';
$outCode .= '<textarea name="edit[file]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatForTextarea($fileContent) . '</textarea>';
$outCode .= '<input type="Hidden" name="edit[filename]" value="' . $e[file] . '">';
$outCode .= '<input type="Hidden" name="e[file]" value="' . htmlspecialchars($e[file]) . '">';
$theOutput .= $this->pObj->doc->spacer(15);
$theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('editResource'), '');
$theOutput .= $this->pObj->doc->sectionEnd() . $outCode;
} else {
$theOutput .= $this->pObj->doc->spacer(15);
$fileToBig = sprintf($GLOBALS['LANG']->getLL('filesizeExceeded'), $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['max_size']);
$filesizeNotAllowed = sprintf($GLOBALS['LANG']->getLL('notAllowed'), $GLOBALS['TCA']['sys_template']['columns']['resources']['config']['max_size']);
$theOutput .= $this->pObj->doc->section('<font color=red>' . $fileToBig . '</font>', $filesizeNotAllowed, 0, 0, 0, 1);
}
}
}
if ($e['config']) {
$outCode = '<textarea name="data[config]" rows="' . $numberOfRows . '" wrap="off" class="fixed-font enable-tab"' . $this->pObj->doc->formWidthText(48, 'width:98%;height:70%', 'off') . ' class="fixed-font">' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatForTextarea($tplRow['config']) . '</textarea>';
$outCode .= '<input type="Hidden" name="e[config]" value="1">';
// Display "Include TypoScript file content?" checkbox
$outCode .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->pObj->id, 'SET[includeTypoScriptFileContent]', $this->pObj->MOD_SETTINGS['includeTypoScriptFileContent'], '', '&e[config]=1', 'id="checkIncludeTypoScriptFileContent"');
$outCode .= '<label for="checkIncludeTypoScriptFileContent">' . $GLOBALS['LANG']->getLL('includeTypoScriptFileContent') . '</label><br />';
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:67,代码来源:TypoScriptTemplateInformationModuleFunctionController.php
示例9: renderListContent
/**
* Rendering all other listings than QuickEdit
*
* @return void
* @todo Define visibility
*/
public function renderListContent()
{
// Initialize list object (see "class.db_layout.inc"):
/** @var $dblist \TYPO3\CMS\Backend\View\PageLayoutView */
$dblist = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\View\\PageLayoutView');
$dblist->backPath = $GLOBALS['BACK_PATH'];
$dblist->thumbs = $this->imagemode;
$dblist->no_noWrap = 1;
$dblist->descrTable = $this->descrTable;
$this->pointer = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->pointer, 0, 100000);
$dblist->script = 'db_layout.php';
$dblist->showIcon = 0;
$dblist->setLMargin = 0;
$dblist->doEdit = $this->EDIT_CONTENT;
$dblist->ext_CALC_PERMS = $this->CALC_PERMS;
$dblist->agePrefixes = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears');
$dblist->id = $this->id;
$dblist->nextThree = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->modTSconfig['properties']['editFieldsAtATime'], 0, 10);
$dblist->option_showBigButtons = $this->modTSconfig['properties']['disableBigButtons'] === '0';
$dblist->option_newWizard = $this->modTSconfig['properties']['disableNewContentElementWizard'] ? 0 : 1;
$dblist->defLangBinding = $this->modTSconfig['properties']['defLangBinding'] ? 1 : 0;
if (!$dblist->nextThree) {
$dblist->nextThree = 1;
}
$dblist->externalTables = $this->externalTables;
// Create menu for selecting a table to jump to (this is, if more than just pages/tt_content elements are found on the page!)
$h_menu = $dblist->getTableMenu($this->id);
// Initialize other variables:
$h_func = '';
$tableOutput = array();
$tableJSOutput = array();
$CMcounter = 0;
// Traverse the list of table names which has records on this page (that array is populated
// by the $dblist object during the function getTableMenu()):
foreach ($dblist->activeTables as $table => $value) {
// Load full table definitions:
\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($table);
if (!isset($dblist->externalTables[$table])) {
$q_count = $this->getNumberOfHiddenElements();
$h_func_b = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($this->id, 'SET[tt_content_showHidden]', $this->MOD_SETTINGS['tt_content_showHidden'], 'db_layout.php', '', 'id="checkTt_content_showHidden"') . '<label for="checkTt_content_showHidden">' . (!$q_count ? $GLOBALS['TBE_TEMPLATE']->dfw($GLOBALS['LANG']->getLL('hiddenCE')) : $GLOBALS['LANG']->getLL('hiddenCE') . ' (' . $q_count . ')') . '</label>';
// Boolean: Display up/down arrows and edit icons for tt_content records
$dblist->tt_contentConfig['showCommands'] = 1;
// Boolean: Display info-marks or not
$dblist->tt_contentConfig['showInfo'] = 1;
// Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol'] is shown
// in the total width of the page
$dblist->tt_contentConfig['single'] = 0;
if ($this->MOD_SETTINGS['function'] == 4) {
// Grid view
$dblist->tt_contentConfig['showAsGrid'] = 1;
}
// Setting up the tt_content columns to show:
if (is_array($GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['items'])) {
$colList = array();
$tcaItems = \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction('EXT:cms/classes/class.tx_cms_backendlayout.php:TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getColPosListItemsParsed', $this->id, $this);
foreach ($tcaItems as $temp) {
$colList[] = $temp[1];
}
} else {
// ... should be impossible that colPos has no array. But this is the fallback should it make any sense:
$colList = array('1', '0', '2', '3');
}
if (strcmp($this->colPosList, '')) {
$colList = array_intersect(\TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $this->colPosList), $colList);
}
// If only one column found, display the single-column view.
if (count($colList) === 1 && !$this->MOD_SETTINGS['function'] === 4) {
// Boolean: If set, the content of column(s) $this->tt_contentConfig['showSingleCol']
// is shown in the total width of the page
$dblist->tt_contentConfig['single'] = 1;
// The column(s) to show if single mode (under each other)
$dblist->tt_contentConfig['showSingleCol'] = current($colList);
}
// The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
$dblist->tt_contentConfig['cols'] = implode(',', $colList);
$dblist->tt_contentConfig['showHidden'] = $this->MOD_SETTINGS['tt_content_showHidden'];
$dblist->tt_contentConfig['sys_language_uid'] = intval($this->current_sys_language);
// If the function menu is set to "Language":
if ($this->MOD_SETTINGS['function'] == 2) {
$dblist->tt_contentConfig['single'] = 0;
$dblist->tt_contentConfig['languageMode'] = 1;
$dblist->tt_contentConfig['languageCols'] = $this->MOD_MENU['language'];
$dblist->tt_contentConfig['languageColsPointer'] = $this->current_sys_language;
}
} else {
if (isset($this->MOD_SETTINGS) && isset($this->MOD_MENU)) {
$h_func = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[' . $table . ']', $this->MOD_SETTINGS[$table], $this->MOD_MENU[$table], 'db_layout.php', '');
} else {
$h_func = '';
}
}
// Start the dblist object:
$dblist->itemsLimitSingleTable = 1000;
$dblist->start($this->id, $table, $this->pointer, $this->search_field, $this->search_levels, $this->showLimit);
//.........这里部分代码省略.........
示例10: main
/**
* Main function of class
*
* @return string HTML output
*/
public function main()
{
$menu = BackendUtility::getFuncMenu($this->pObj->id, 'SET[tsconf_parts]', $this->pObj->MOD_SETTINGS['tsconf_parts'], $this->pObj->MOD_MENU['tsconf_parts']);
$menu .= '<div class="checkbox"><label for="checkTsconf_alphaSort">' . BackendUtility::getFuncCheck($this->pObj->id, 'SET[tsconf_alphaSort]', $this->pObj->MOD_SETTINGS['tsconf_alphaSort'], '', '', 'id="checkTsconf_alphaSort"') . $GLOBALS['LANG']->getLL('sort_alphabetic', TRUE) . '</label></div>';
$menu .= '<br /><br />';
$theOutput = $this->pObj->doc->header($GLOBALS['LANG']->getLL('tsconf_title'));
if ($this->pObj->MOD_SETTINGS['tsconf_parts'] == 99) {
$TSparts = BackendUtility::getPagesTSconfig($this->pObj->id, NULL, TRUE);
$lines = array();
$pUids = array();
foreach ($TSparts as $k => $v) {
if ($k != 'uid_0') {
if ($k == 'defaultPageTSconfig') {
$pTitle = '<strong>' . $GLOBALS['LANG']->getLL('editTSconfig_default', TRUE) . '</strong>';
$editIcon = '';
} else {
$pUids[] = substr($k, 4);
$row = BackendUtility::getRecordWSOL('pages', substr($k, 4));
$pTitle = $this->pObj->doc->getHeader('pages', $row, '', FALSE);
$editIdList = substr($k, 4);
$params = '&edit[pages][' . $editIdList . ']=edit&columnsOnly=TSconfig';
$onclickUrl = BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'], '');
$editIcon = '<a href="#" onclick="' . htmlspecialchars($onclickUrl) . '" title="' . $GLOBALS['LANG']->getLL('editTSconfig', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</a>';
}
$TScontent = nl2br(htmlspecialchars(trim($v) . chr(10)));
$tsparser = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
$tsparser->lineNumberOffset = 0;
$TScontent = $tsparser->doSyntaxHighlight(trim($v) . LF);
$lines[] = '
<tr><td nowrap="nowrap" class="bgColor5">' . $pTitle . '</td></tr>
<tr><td nowrap="nowrap" class="bgColor4">' . $TScontent . $editIcon . '</td></tr>
<tr><td> </td></tr>
';
}
}
if (count($pUids)) {
$params = '&edit[pages][' . implode(',', $pUids) . ']=edit&columnsOnly=TSconfig';
$onclickUrl = BackendUtility::editOnClick($params, $GLOBALS['BACK_PATH'], '');
$editIcon = '<a href="#" onclick="' . htmlspecialchars($onclickUrl) . '" title="' . $GLOBALS['LANG']->getLL('editTSconfig_all', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '<strong>' . $GLOBALS['LANG']->getLL('editTSconfig_all', TRUE) . '</strong>' . '</a>';
} else {
$editIcon = '';
}
$theOutput .= $this->pObj->doc->section('', BackendUtility::cshItem('_MOD_' . $GLOBALS['MCONF']['name'], 'tsconfig_edit', $GLOBALS['BACK_PATH'], '|<br />') . $menu . '
<br /><br />
<!-- Edit fields: -->
<table border="0" cellpadding="0" cellspacing="1">' . implode('', $lines) . '</table><br />' . $editIcon, 0, 1);
} else {
// Defined global here!
$tmpl = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\ExtendedTemplateService');
// Do not log time-performance information
$tmpl->tt_track = 0;
$tmpl->fixedLgd = 0;
$tmpl->linkObjects = 0;
$tmpl->bType = '';
$tmpl->ext_expandAllNotes = 1;
$tmpl->ext_noPMicons = 1;
switch ($this->pObj->MOD_SETTINGS['tsconf_parts']) {
case '1':
$modTSconfig = BackendUtility::getModTSconfig($this->pObj->id, 'mod');
break;
case '1a':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_layout', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1b':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_view', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1c':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_modules', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1d':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_list', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1e':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_info', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1f':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_func', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1g':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.web_ts', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '2':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('RTE', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '5':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('TCEFORM', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '6':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('TCEMAIN', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '3':
$modTSconfig = $GLOBALS['BE_USER']->getTSConfig('TSFE', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '4':
//.........这里部分代码省略.........
示例11: func_search
/**
* Search (Full / Advanced)
*
* @return void
* @todo Define visibility
*/
public function func_search()
{
global $LANG;
$fullsearch = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryView');
$fullsearch->setFormName($this->formName);
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('search'));
$this->content .= $this->doc->spacer(5);
$menu2 = '';
if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
$menu2 = \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[search]', $this->MOD_SETTINGS['search'], $this->MOD_MENU['search']);
}
if ($this->MOD_SETTINGS['search'] == 'query' && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
$menu2 .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[search_query_makeQuery]', $this->MOD_SETTINGS['search_query_makeQuery'], $this->MOD_MENU['search_query_makeQuery']) . '<br />';
}
if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopCheckboxes'] && $this->MOD_SETTINGS['search'] == 'query') {
$menu2 .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[search_query_smallparts]', $this->MOD_SETTINGS['search_query_smallparts'], '', '', 'id="checkSearch_query_smallparts"') . ' <label for="checkSearch_query_smallparts">' . $GLOBALS['LANG']->getLL('showSQL') . '</label><br />';
$menu2 .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[search_result_labels]', $this->MOD_SETTINGS['search_result_labels'], '', '', 'id="checkSearch_result_labels"') . ' <label for="checkSearch_result_labels">' . $GLOBALS['LANG']->getLL('useFormattedStrings') . '</label><br />';
$menu2 .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[labels_noprefix]', $this->MOD_SETTINGS['labels_noprefix'], '', '', 'id="checkLabels_noprefix"') . ' <label for="checkLabels_noprefix">' . $GLOBALS['LANG']->getLL('dontUseOrigValues') . '</label><br />';
$menu2 .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[options_sortlabel]', $this->MOD_SETTINGS['options_sortlabel'], '', '', 'id="checkOptions_sortlabel"') . ' <label for="checkOptions_sortlabel">' . $GLOBALS['LANG']->getLL('sortOptions') . '</label><br />';
$menu2 .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[show_deleted]', $this->MOD_SETTINGS['show_deleted'], '', '', 'id="checkShow_deleted"') . ' <label for="checkShow_deleted">' . $GLOBALS['LANG']->getLL('showDeleted') . '</label>';
}
$this->content .= $this->doc->section('', $menu2) . $this->doc->spacer(10);
switch ($this->MOD_SETTINGS['search']) {
case 'query':
$this->content .= $fullsearch->queryMaker();
break;
case 'raw':
default:
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('searchOptions'), $fullsearch->form(), FALSE, TRUE);
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('result'), $fullsearch->search(), FALSE, TRUE);
break;
}
}
示例12: main
/**
* Main
*
* @return string
*/
public function main()
{
$theOutput = '';
// Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
// Checking for more than one template an if, set a menu...
$manyTemplatesMenu = $this->pObj->templateMenu();
$template_uid = 0;
if ($manyTemplatesMenu) {
$template_uid = $this->pObj->MOD_SETTINGS['templatesOnPage'];
}
$existTemplate = $this->initialize_editor($this->pObj->id, $template_uid);
// initialize
$lang = $this->getLanguageService();
if ($existTemplate) {
$siteTitle = trim($GLOBALS['tplRow']['sitetitle']);
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$theOutput .= $this->pObj->doc->section($lang->getLL('currentTemplate', true), $iconFactory->getIconForRecord('sys_template', $GLOBALS['tplRow'], Icon::SIZE_SMALL)->render() . '<strong>' . $this->pObj->linkWrapTemplateTitle($GLOBALS['tplRow']['title']) . '</strong>' . htmlspecialchars($siteTitle ? ' (' . $siteTitle . ')' : ''));
}
if ($manyTemplatesMenu) {
$theOutput .= $this->pObj->doc->section('', $manyTemplatesMenu);
}
$templateService = $this->getExtendedTemplateService();
$templateService->clearList_const_temp = array_flip($templateService->clearList_const);
$templateService->clearList_setup_temp = array_flip($templateService->clearList_setup);
$pointer = count($templateService->hierarchyInfo);
$hierarchyInfo = $templateService->ext_process_hierarchyInfo(array(), $pointer);
$head = '<thead><tr>';
$head .= '<th>' . $lang->getLL('title', true) . '</th>';
$head .= '<th>' . $lang->getLL('rootlevel', true) . '</th>';
$head .= '<th>' . $lang->getLL('clearSetup', true) . '</th>';
$head .= '<th>' . $lang->getLL('clearConstants', true) . '</th>';
$head .= '<th>' . $lang->getLL('pid', true) . '</th>';
$head .= '<th>' . $lang->getLL('rootline', true) . '</th>';
$head .= '<th>' . $lang->getLL('nextLevel', true) . '</th>';
$head .= '</tr></thead>';
$hierar = implode(array_reverse($templateService->ext_getTemplateHierarchyArr($hierarchyInfo, '', array(), 1)), '');
$hierar = '<div class="table-fit"><table class="table table-striped table-hover" id="ts-analyzer">' . $head . $hierar . '</table></div>';
$theOutput .= $this->pObj->doc->spacer(5);
$theOutput .= $this->pObj->doc->section($lang->getLL('templateHierarchy', true), $hierar, 0, 1);
$urlParameters = array('id' => $GLOBALS['SOBE']->id, 'template' => 'all');
$aHref = BackendUtility::getModuleUrl('web_ts', $urlParameters);
$completeLink = '<p><a href="' . htmlspecialchars($aHref) . '" class="btn btn-default">' . $lang->getLL('viewCompleteTS', true) . '</a></p>';
$theOutput .= $this->pObj->doc->spacer(5);
$theOutput .= $this->pObj->doc->section($lang->getLL('completeTS', true), $completeLink, 0, 1);
$theOutput .= $this->pObj->doc->spacer(15);
// Output options
$theOutput .= $this->pObj->doc->section($lang->getLL('displayOptions', true), '', false, true);
$template = GeneralUtility::_GET('template');
$addParams = $template ? '&template=' . $template : '';
$theOutput .= '<div class="tst-analyzer-options">' . '<div class="checkbox"><label for="checkTs_analyzer_checkLinenum">' . BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_analyzer_checkLinenum]', $this->pObj->MOD_SETTINGS['ts_analyzer_checkLinenum'], '', $addParams, 'id="checkTs_analyzer_checkLinenum"') . $lang->getLL('lineNumbers', true) . '</label></div>' . '<div class="checkbox"><label for="checkTs_analyzer_checkSyntax">' . BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_analyzer_checkSyntax]', $this->pObj->MOD_SETTINGS['ts_analyzer_checkSyntax'], '', $addParams, 'id="checkTs_analyzer_checkSyntax"') . $lang->getLL('syntaxHighlight', true) . '</label> ' . '</label></div>';
if (!$this->pObj->MOD_SETTINGS['ts_analyzer_checkSyntax']) {
$theOutput .= '<div class="checkbox"><label for="checkTs_analyzer_checkComments">' . BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_analyzer_checkComments]', $this->pObj->MOD_SETTINGS['ts_analyzer_checkComments'], '', $addParams, 'id="checkTs_analyzer_checkComments"') . $lang->getLL('comments', true) . '</label></div>' . '<div class="checkbox"><label for="checkTs_analyzer_checkCrop">' . BackendUtility::getFuncCheck($this->pObj->id, 'SET[ts_analyzer_checkCrop]', $this->pObj->MOD_SETTINGS['ts_analyzer_checkCrop'], '', $addParams, 'id="checkTs_analyzer_checkCrop"') . $lang->getLL('cropLines', true) . '</label></div>';
}
$theOutput .= '</div>';
$theOutput .= $this->pObj->doc->spacer(25);
if ($template) {
// Output Constants
$theOutput .= $this->pObj->doc->section($lang->getLL('constants', true), '', 0, 1);
$theOutput .= $this->pObj->doc->sectionEnd();
$templateService->ext_lineNumberOffset = 0;
$templateService->ext_lineNumberOffset_mode = 'const';
foreach ($templateService->constants as $key => $val) {
$currentTemplateId = $templateService->hierarchyInfo[$key]['templateID'];
if ($currentTemplateId == $template || $template === 'all') {
$theOutput .= '
<h3>' . htmlspecialchars($templateService->hierarchyInfo[$key]['title']) . '</h3>
<div class="nowrap">' . $templateService->ext_outputTS(array($val), $this->pObj->MOD_SETTINGS['ts_analyzer_checkLinenum'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkComments'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkCrop'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkSyntax'], 0) . '</div>
';
if ($template !== 'all') {
break;
}
}
$templateService->ext_lineNumberOffset += count(explode(LF, $val)) + 1;
}
// Output Setup
$theOutput .= $this->pObj->doc->spacer(15);
$theOutput .= $this->pObj->doc->section($lang->getLL('setup', true), '', 0, 1);
$theOutput .= $this->pObj->doc->sectionEnd();
$templateService->ext_lineNumberOffset = 0;
$templateService->ext_lineNumberOffset_mode = 'setup';
foreach ($templateService->config as $key => $val) {
$currentTemplateId = $templateService->hierarchyInfo[$key]['templateID'];
if ($currentTemplateId == $template || $template == 'all') {
$theOutput .= '
<h3>' . htmlspecialchars($templateService->hierarchyInfo[$key]['title']) . '</h3>
<div class="nowrap">' . $templateService->ext_outputTS(array($val), $this->pObj->MOD_SETTINGS['ts_analyzer_checkLinenum'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkComments'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkCrop'], $this->pObj->MOD_SETTINGS['ts_analyzer_checkSyntax'], 0) . '</div>
';
if ($template !== 'all') {
break;
}
}
$templateService->ext_lineNumberOffset += count(explode(LF, $val)) + 1;
}
}
return $theOutput;
//.........这里部分代码省略.........
示例13: main
/**
* Main function of class
*
* @return string HTML output
*/
public function main()
{
if ((int) GeneralUtility::_GP('id') === 0) {
$lang = $this->getLanguageService();
return '<div class="nowrap"><div class="table-fit"><table class="table table-striped table-hover" id="tsconfig-overview">' . '<thead>' . '<tr>' . '<th>' . $lang->getLL('pagetitle') . '</th>' . '<th>' . $lang->getLL('included_tsconfig_files') . '</th>' . '<th>' . $lang->getLL('written_tsconfig_lines') . '</th>' . '</tr>' . '</thead>' . '<tbody>' . implode('', $this->getOverviewOfPagesUsingTSConfig()) . '</tbody>' . '</table></div>';
} else {
$menu = '<div class="form-inline form-inline-spaced">';
$menu .= BackendUtility::getDropdownMenu($this->pObj->id, 'SET[tsconf_parts]', $this->pObj->MOD_SETTINGS['tsconf_parts'], $this->pObj->MOD_MENU['tsconf_parts']);
$menu .= '<div class="checkbox"><label for="checkTsconf_alphaSort">' . BackendUtility::getFuncCheck($this->pObj->id, 'SET[tsconf_alphaSort]', $this->pObj->MOD_SETTINGS['tsconf_alphaSort'], '', '', 'id="checkTsconf_alphaSort"') . ' ' . $this->getLanguageService()->getLL('sort_alphabetic', true) . '</label></div>';
$menu .= '</div>';
$theOutput = '<h1>' . htmlspecialchars($this->getLanguageService()->getLL('tsconf_title')) . '</h1>';
if ($this->pObj->MOD_SETTINGS['tsconf_parts'] == 99) {
$TSparts = BackendUtility::getPagesTSconfig($this->pObj->id, null, true);
$lines = array();
$pUids = array();
foreach ($TSparts as $k => $v) {
if ($k != 'uid_0') {
if ($k == 'defaultPageTSconfig') {
$pTitle = '<strong>' . $this->getLanguageService()->getLL('editTSconfig_default', true) . '</strong>';
$editIcon = '';
} else {
$pUids[] = substr($k, 4);
$row = BackendUtility::getRecordWSOL('pages', substr($k, 4));
$icon = $this->iconFactory->getIconForRecord('pages', $row, Icon::SIZE_SMALL);
$pTitle = BackendUtility::wrapClickMenuOnIcon($icon, 'pages', $row['uid']) . ' ' . htmlspecialchars(BackendUtility::getRecordTitle('pages', $row));
$editIdList = substr($k, 4);
$urlParameters = ['edit' => ['pages' => [$editIdList => 'edit']], 'columnsOnly' => 'TSconfig', 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')];
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$editIcon = '<a href="' . htmlspecialchars($url) . '" title="' . $this->getLanguageService()->getLL('editTSconfig', true) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
}
$TScontent = nl2br(htmlspecialchars(trim($v) . LF));
$tsparser = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
$tsparser->lineNumberOffset = 0;
$TScontent = $tsparser->doSyntaxHighlight(trim($v) . LF);
$lines[] = '
<tr><td nowrap="nowrap" class="bgColor5">' . $pTitle . '</td></tr>
<tr><td nowrap="nowrap" class="bgColor4">' . $TScontent . $editIcon . '</td></tr>
<tr><td> </td></tr>
';
}
}
if (!empty($pUids)) {
$urlParameters = ['edit' => ['pages' => [implode(',', $pUids) => 'edit']], 'columnsOnly' => 'TSconfig', 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')];
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$editIcon = '<a href="' . htmlspecialchars($url) . '" title="' . $this->getLanguageService()->getLL('editTSconfig_all', true) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '<strong>' . $this->getLanguageService()->getLL('editTSconfig_all', true) . '</strong>' . '</a>';
} else {
$editIcon = '';
}
$theOutput .= '<div>';
$theOutput .= BackendUtility::cshItem('_MOD_web_info', 'tsconfig_edit', null, '<span class="btn btn-default btn-sm">|</span>') . $menu . '
<!-- Edit fields: -->
<table border="0" cellpadding="0" cellspacing="1">' . implode('', $lines) . '</table><br />' . $editIcon;
$theOutput .= '</div>';
} else {
// Defined global here!
$tmpl = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::class);
// Do not log time-performance information
$tmpl->tt_track = 0;
$tmpl->fixedLgd = 0;
$tmpl->linkObjects = 0;
$tmpl->bType = '';
$tmpl->ext_expandAllNotes = 1;
$tmpl->ext_noPMicons = 1;
$beUser = $this->getBackendUser();
switch ($this->pObj->MOD_SETTINGS['tsconf_parts']) {
case '1':
$modTSconfig = BackendUtility::getModTSconfig($this->pObj->id, 'mod');
break;
case '1a':
$modTSconfig = $beUser->getTSConfig('mod.web_layout', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1b':
$modTSconfig = $beUser->getTSConfig('mod.web_view', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1c':
$modTSconfig = $beUser->getTSConfig('mod.web_modules', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1d':
$modTSconfig = $beUser->getTSConfig('mod.web_list', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1e':
$modTSconfig = $beUser->getTSConfig('mod.web_info', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1f':
$modTSconfig = $beUser->getTSConfig('mod.web_func', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1g':
$modTSconfig = $beUser->getTSConfig('mod.web_ts', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '2':
$modTSconfig = $beUser->getTSConfig('RTE', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '5':
$modTSconfig = $beUser->getTSConfig('TCEFORM', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
//.........这里部分代码省略.........
示例14: main
/**
* Main function of the module. Write the content to
*
* @return void
*/
public function main()
{
// Get language to export/import
$this->sysLanguage = $this->MOD_SETTINGS["lang"];
// Draw the header.
$this->doc = GeneralUtility::makeInstance(DocumentTemplate::class);
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:l10nmgr/Resources/Private/Templates/Cm1Template.html');
$this->doc->form = '<form action="" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '">';
// JavaScript
$this->doc->JScode = '
<script language="javascript" type="text/javascript">
script_ended = 0;
function jumpToUrl(URL) {
document.location = URL;
}
</script>
<script language="javascript" type="text/javascript" src="' . GeneralUtility::resolveBackPath($GLOBALS['BACK_PATH'] . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('l10nmgr') . 'Resources/Public/Contrib/tabs.js') . '"></script>
<link rel="stylesheet" type="text/css" href="' . GeneralUtility::resolveBackPath($GLOBALS['BACK_PATH'] . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('l10nmgr') . 'Resources/Public/Contrib/tabs.css') . '" />';
// Find l10n configuration record
/** @var $l10ncfgObj L10nConfiguration */
$l10ncfgObj = GeneralUtility::makeInstance(L10nConfiguration::class);
$l10ncfgObj->load($this->id);
if ($l10ncfgObj->isLoaded()) {
// Setting page id
$this->id = $l10ncfgObj->getData('pid');
$this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
$this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;
if ($this->id && $access) {
// Header:
// $this->content.=$this->doc->startPage($GLOBALS['LANG']->getLL('general.title'));
// $this->content.=$this->doc->header($GLOBALS['LANG']->getLL('general.title'));
// Create and render view to show details for the current l10nmgrcfg
/** @var $l10nmgrconfigurationView L10nConfigurationDetailView */
$l10nmgrconfigurationView = GeneralUtility::makeInstance(L10nConfigurationDetailView::class, $l10ncfgObj, $this->doc);
$this->content .= $this->doc->section('', $l10nmgrconfigurationView->render());
$this->content .= $this->doc->divider(15);
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('general.export.choose.action.title'), BackendUtility::getFuncMenu($l10ncfgObj->getId(), "SET[lang]", $this->sysLanguage, $this->MOD_MENU["lang"], '', '&srcPID=' . rawurlencode(GeneralUtility::_GET('srcPID'))) . BackendUtility::getFuncMenu($l10ncfgObj->getId(), "SET[action]", $this->MOD_SETTINGS["action"], $this->MOD_MENU["action"], '', '&srcPID=' . rawurlencode(GeneralUtility::_GET('srcPID'))) . BackendUtility::getFuncCheck($l10ncfgObj->getId(), "SET[onlyChangedContent]", $this->MOD_SETTINGS["onlyChangedContent"], '', '&srcPID=' . rawurlencode(GeneralUtility::_GET('srcPID'))) . ' ' . $GLOBALS['LANG']->getLL('export.xml.new.title') . BackendUtility::getFuncCheck($l10ncfgObj->getId(), "SET[noHidden]", $this->MOD_SETTINGS["noHidden"], '', '&srcPID=' . rawurlencode(GeneralUtility::_GET('srcPID'))) . ' ' . $GLOBALS['LANG']->getLL('export.xml.noHidden.title') . '</br>');
// Render content:
if (!count($this->MOD_MENU['lang'])) {
$this->content .= $this->doc->section('ERROR', $GLOBALS['LANG']->getLL('general.access.error.title'));
} else {
$this->moduleContent($l10ncfgObj);
}
}
}
$this->content .= $this->doc->spacer(10);
$markers['CONTENT'] = $this->content;
// Build the <body> for the module
$docHeaderButtons = $this->getButtons();
$this->content = $this->doc->startPage($GLOBALS['LANG']->getLL('general.title'));
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例15: makeSelectorTable
/**
* Make selector table
*
* @param array $modSettings
* @param string $enableList
* @return string
*/
public function makeSelectorTable($modSettings, $enableList = 'table,fields,query,group,order,limit')
{
$out = array();
$enableArr = explode(',', $enableList);
$backendUserAuthentication = $this->getBackendUserAuthentication();
// Make output
if (in_array('table', $enableArr) && !$backendUserAuthentication->userTS['mod.']['dbint.']['disableSelectATable']) {
$out[] = '<div class="form-group">';
$out[] = ' <label for="SET[queryTable]">Select a table:</label>';
$out[] = $this->mkTableSelect('SET[queryTable]', $this->table);
$out[] = '</div>';
}
if ($this->table) {
// Init fields:
$this->setAndCleanUpExternalLists('queryFields', $modSettings['queryFields'], 'uid,' . $this->getLabelCol());
$this->setAndCleanUpExternalLists('queryGroup', $modSettings['queryGroup']);
$this->setAndCleanUpExternalLists('queryOrder', $modSettings['queryOrder'] . ',' . $modSettings['queryOrder2']);
// Limit:
$this->extFieldLists['queryLimit'] = $modSettings['queryLimit'];
if (!$this->extFieldLists['queryLimit']) {
$this->extFieldLists['queryLimit'] = 100;
}
$parts = GeneralUtility::intExplode(',', $this->extFieldLists['queryLimit']);
if ($parts[1]) {
$this->limitBegin = $parts[0];
$this->limitLength = $parts[1];
} else {
$this->limitLength = $this->extFieldLists['queryLimit'];
}
$this->extFieldLists['queryLimit'] = implode(',', array_slice($parts, 0, 2));
// Insert Descending parts
if ($this->extFieldLists['queryOrder']) {
$descParts = explode(',', $modSettings['queryOrderDesc'] . ',' . $modSettings['queryOrder2Desc']);
$orderParts = explode(',', $this->extFieldLists['queryOrder']);
$reList = array();
foreach ($orderParts as $kk => $vv) {
$reList[] = $vv . ($descParts[$kk] ? ' DESC' : '');
}
$this->extFieldLists['queryOrder_SQL'] = implode(',', $reList);
}
// Query Generator:
$this->procesData($modSettings['queryConfig'] ? unserialize($modSettings['queryConfig']) : '');
$this->queryConfig = $this->cleanUpQueryConfig($this->queryConfig);
$this->enableQueryParts = (bool) $modSettings['search_query_smallparts'];
$codeArr = $this->getFormElements();
$queryCode = $this->printCodeArray($codeArr);
if (in_array('fields', $enableArr) && !$backendUserAuthentication->userTS['mod.']['dbint.']['disableSelectFields']) {
$out[] = '<div class="form-group form-group-with-button-addon">';
$out[] = ' <label for="SET[queryFields]">Select fields:</label>';
$out[] = $this->mkFieldToInputSelect('SET[queryFields]', $this->extFieldLists['queryFields']);
$out[] = '</div>';
}
if (in_array('query', $enableArr) && !$backendUserAuthentication->userTS['mod.']['dbint.']['disableMakeQuery']) {
$out[] = '<div class="form-group">';
$out[] = ' <label>Make Query:</label>';
$out[] = $queryCode;
$out[] = '</div>';
}
if (in_array('group', $enableArr) && !$backendUserAuthentication->userTS['mod.']['dbint.']['disableGroupBy']) {
$out[] = '<div class="form-group form-inline">';
$out[] = ' <label for="SET[queryGroup]">Group By:</label>';
$out[] = $this->mkTypeSelect('SET[queryGroup]', $this->extFieldLists['queryGroup'], '');
$out[] = '</div>';
}
if (in_array('order', $enableArr) && !$backendUserAuthentication->userTS['mod.']['dbint.']['disableOrderBy']) {
$module = $this->getModule();
$orderByArr = explode(',', $this->extFieldLists['queryOrder']);
$orderBy = array();
$orderBy[] = $this->mkTypeSelect('SET[queryOrder]', $orderByArr[0], '');
$orderBy[] = '<div class="checkbox">';
$orderBy[] = ' <label for="checkQueryOrderDesc">';
$orderBy[] = BackendUtility::getFuncCheck($module->id, 'SET[queryOrderDesc]', $modSettings['queryOrderDesc'], '', '', 'id="checkQueryOrderDesc"') . ' Descending';
$orderBy[] = ' </label>';
$orderBy[] = '</div>';
if ($orderByArr[0]) {
$orderBy[] = $this->mkTypeSelect('SET[queryOrder2]', $orderByArr[1], '');
$orderBy[] = '<div class="checkbox">';
$orderBy[] = ' <label for="checkQueryOrder2Desc">';
$orderBy[] = BackendUtility::getFuncCheck($module->id, 'SET[queryOrder2Desc]', $modSettings['queryOrder2Desc'], '', '', 'id="checkQueryOrder2Desc"') . ' Descending';
$orderBy[] = ' </label>';
$orderBy[] = '</div>';
}
$out[] = '<div class="form-group form-inline">';
$out[] = ' <label>Order By:</label>';
$out[] = implode(LF, $orderBy);
$out[] = '</div>';
}
if (in_array('limit', $enableArr) && !$backendUserAuthentication->userTS['mod.']['dbint.']['disableLimit']) {
$limit = array();
$limit[] = '<div class="input-group">';
$limit[] = ' <div class="input-group-addon">';
$limit[] = ' <span class="input-group-btn">';
$limit[] = $this->updateIcon();
//.........这里部分代码省略.........