本文整理汇总了PHP中t3lib_BEfunc::getModTSconfig方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_BEfunc::getModTSconfig方法的具体用法?PHP t3lib_BEfunc::getModTSconfig怎么用?PHP t3lib_BEfunc::getModTSconfig使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_BEfunc
的用法示例。
在下文中一共展示了t3lib_BEfunc::getModTSconfig方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSystemLanguages
/**
* Returns array of system languages
* @param integer page id (only used to get TSconfig configuration setting flag and label for default language)
* @param string Backpath for flags
* @return array
*/
function getSystemLanguages($page_id = 0, $backPath = '')
{
global $TCA, $LANG;
// Icons and language titles:
t3lib_div::loadTCA('sys_language');
$flagAbsPath = t3lib_div::getFileAbsFileName($TCA['sys_language']['columns']['flag']['config']['fileFolder']);
$flagIconPath = $backPath . '../' . substr($flagAbsPath, strlen(PATH_site));
$modSharedTSconfig = t3lib_BEfunc::getModTSconfig($page_id, 'mod.SHARED');
$languageIconTitles = array();
// Set default:
$languageIconTitles[0] = array('uid' => 0, 'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (' . $LANG->getLL('defaultLanguage') . ')' : $LANG->getLL('defaultLanguage'), 'ISOcode' => 'DEF', 'flagIcon' => strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath . $modSharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath . $modSharedTSconfig['properties']['defaultLanguageFlag'] : null);
// Set "All" language:
$languageIconTitles[-1] = array('uid' => -1, 'title' => $LANG->getLL('multipleLanguages'), 'ISOcode' => 'DEF', 'flagIcon' => $flagIconPath . 'multi-language.gif');
// Find all system languages:
$sys_languages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_language', '');
foreach ($sys_languages as $row) {
$languageIconTitles[$row['uid']] = $row;
if ($row['static_lang_isocode'] && t3lib_extMgm::isLoaded('static_info_tables')) {
$staticLangRow = t3lib_BEfunc::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
if ($staticLangRow['lg_iso_2']) {
$languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
}
}
if (strlen($row['flag'])) {
$languageIconTitles[$row['uid']]['flagIcon'] = @is_file($flagAbsPath . $row['flag']) ? $flagIconPath . $row['flag'] : '';
}
}
return $languageIconTitles;
}
示例2: getSystemLanguages
/**
* Returns array of system languages
*
* Since TYPO3 4.5 the flagIcon is not returned as a filename in "gfx/flags/*" anymore,
* but as a string <flags-xx>. The calling party should call
* t3lib_iconWorks::getSpriteIcon(<flags-xx>) to get an HTML which will represent
* the flag of this language.
*
* @param integer page id (only used to get TSconfig configuration setting flag and label for default language)
* @param string Backpath for flags
* @return array Array with languages (title, uid, flagIcon)
*/
function getSystemLanguages($page_id = 0, $backPath = '')
{
global $TCA, $LANG;
$modSharedTSconfig = t3lib_BEfunc::getModTSconfig($page_id, 'mod.SHARED');
$languageIconTitles = array();
// fallback "old iconstyles"
if (preg_match('/\\.gif$/', $modSharedTSconfig['properties']['defaultLanguageFlag'])) {
$modSharedTSconfig['properties']['defaultLanguageFlag'] = str_replace('.gif', '', $modSharedTSconfig['properties']['defaultLanguageFlag']);
}
$languageIconTitles[0] = array('uid' => 0, 'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (' . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage') . ')' : $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage'), 'ISOcode' => 'DEF', 'flagIcon' => strlen($modSharedTSconfig['properties']['defaultLanguageFlag']) ? 'flags-' . $modSharedTSconfig['properties']['defaultLanguageFlag'] : 'empty-empty');
// Set "All" language:
$languageIconTitles[-1] = array('uid' => -1, 'title' => $LANG->getLL('multipleLanguages'), 'ISOcode' => 'DEF', 'flagIcon' => 'flags-multiple');
// Find all system languages:
$sys_languages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_language', '');
foreach ($sys_languages as $row) {
$languageIconTitles[$row['uid']] = $row;
if ($row['static_lang_isocode'] && t3lib_extMgm::isLoaded('static_info_tables')) {
$staticLangRow = t3lib_BEfunc::getRecord('static_languages', $row['static_lang_isocode'], 'lg_iso_2');
if ($staticLangRow['lg_iso_2']) {
$languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
}
}
if (strlen($row['flag'])) {
$languageIconTitles[$row['uid']]['flagIcon'] = t3lib_iconWorks::mapRecordTypeToSpriteIconName('sys_language', $row);
}
}
return $languageIconTitles;
}
示例3: init
/**
* Initialization of module
*
* @return void
*/
function init()
{
global $BE_USER;
$this->MCONF = $GLOBALS['MCONF'];
$this->id = intval(t3lib_div::_GP('id'));
$this->perms_clause = $BE_USER->getPagePermsClause(1);
// page/be_user TSconfig settings and blinding of menu-items
$this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.' . $this->MCONF['name']);
$this->type = intval($this->modTSconfig['properties']['type']);
}
示例4: getConfiguration
/**
* Returns the configuration
*
* @param integer $id
*
* @return array
*/
public function getConfiguration($id)
{
if (!isset($this->configurationArray[$id])) {
$modTsConfig = t3lib_BEfunc::getModTSconfig($id, 'mod.vcc');
$this->configurationArray[$id] = $modTsConfig['properties'];
// Log debug information
$logData = array('id' => $id, 'configuration' => $modTsConfig['properties']);
$this->loggingService->debug('TsConfigService::getConfiguration id: ' . $id, $logData);
}
return $this->configurationArray[$id];
}
示例5: getColPosListItemsParsed
/**
* Gets the list of available columns for a given page id
*
* @param int $id
* @return array $tcaItems
*/
public function getColPosListItemsParsed($id)
{
$tsConfig = t3lib_BEfunc::getModTSconfig($id, 'TCEFORM.tt_content.colPos');
$tcaConfig = $GLOBALS['TCA']['tt_content']['columns']['colPos']['config'];
$tceForms = t3lib_div::makeInstance('t3lib_TCEForms');
$tcaItems = $tcaConfig['items'];
$tcaItems = $tceForms->addItems($tcaItems, $tsConfig['properties']['addItems.']);
if (isset($tcaConfig['itemsProcFunc']) && $tcaConfig['itemsProcFunc']) {
$tcaItems = $this->addColPosListLayoutItems($id, $tcaItems);
}
foreach (t3lib_div::trimExplode(',', $tsConfig['properties']['removeItems'], 1) as $removeId) {
foreach ($tcaItems as $key => $item) {
if ($item[1] == $removeId) {
unset($tcaItems[$key]);
}
}
}
return $tcaItems;
}
示例6: main
/**
* Main function
*
* @return string Output HTML for the module.
* @access public
*/
function main()
{
global $BACK_PATH, $LANG, $SOBE, $BE_USER, $TYPO3_DB;
$this->modSharedTSconfig = t3lib_BEfunc::getModTSconfig($this->pObj->id, 'mod.SHARED');
$this->allAvailableLanguages = $this->getAvailableLanguages(0, true, true, true);
$output = '';
$this->templavoilaAPIObj = t3lib_div::makeInstance('tx_templavoila_api');
// Showing the tree:
// Initialize starting point of page tree:
$treeStartingPoint = intval($this->pObj->id);
$treeStartingRecord = t3lib_BEfunc::getRecord('pages', $treeStartingPoint);
$depth = $this->pObj->MOD_SETTINGS['depth'];
// Initialize tree object:
$tree = t3lib_div::makeInstance('t3lib_pageTree');
$tree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
// Creating top icon; the current page
$HTML = t3lib_iconWorks::getSpriteIconForRecord('pages', $treeStartingRecord);
$tree->tree[] = array('row' => $treeStartingRecord, 'HTML' => $HTML);
// Create the tree from starting point:
if ($depth > 0) {
$tree->getTree($treeStartingPoint, $depth, '');
}
// Set CSS styles specific for this document:
$this->pObj->content = str_replace('/*###POSTCSSMARKER###*/', '
TABLE.c-list TR TD { white-space: nowrap; vertical-align: top; }
', $this->pObj->content);
// Process commands:
if (t3lib_div::_GP('createReferencesForPage')) {
$this->createReferencesForPage(t3lib_div::_GP('createReferencesForPage'));
}
if (t3lib_div::_GP('createReferencesForTree')) {
$this->createReferencesForTree($tree);
}
// Traverse tree:
$output = '';
$counter = 0;
foreach ($tree->tree as $row) {
$unreferencedElementRecordsArr = $this->getUnreferencedElementsRecords($row['row']['uid']);
if (count($unreferencedElementRecordsArr)) {
$createReferencesLink = '<a href="index.php?id=' . $this->pObj->id . '&createReferencesForPage=' . $row['row']['uid'] . '">Reference elements</a>';
} else {
$createReferencesLink = '';
}
$rowTitle = $row['HTML'] . t3lib_BEfunc::getRecordTitle('pages', $row['row'], TRUE);
$cellAttrib = $row['row']['_CSSCLASS'] ? ' class="' . $row['row']['_CSSCLASS'] . '"' : '';
$tCells = array();
$tCells[] = '<td nowrap="nowrap"' . $cellAttrib . '>' . $rowTitle . '</td>';
$tCells[] = '<td>' . count($unreferencedElementRecordsArr) . '</td>';
$tCells[] = '<td nowrap="nowrap">' . $createReferencesLink . '</td>';
$output .= '
<tr class="bgColor' . ($counter % 2 ? '-20' : '-10') . '">
' . implode('
', $tCells) . '
</tr>';
$counter++;
}
// Create header:
$tCells = array();
$tCells[] = '<td>Page:</td>';
$tCells[] = '<td>No. of unreferenced elements:</td>';
$tCells[] = '<td> </td>';
// Depth selector:
$depthSelectorBox = t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
$finalOutput = '
<br />
' . $depthSelectorBox . '
<a href="index.php?id=' . $this->pObj->id . '&createReferencesForTree=1">Reference elements for whole tree</a><br />
<br />
<table border="0" cellspacing="1" cellpadding="0" class="lrPadding c-list">
<tr class="bgColor5 tableheader">
' . implode('
', $tCells) . '
</tr>' . $output . '
</table>
';
return $finalOutput;
}
示例7: getModTSconfig
/**
* @param int $id Page uid
* @param string $TSref An object string which determines the path of the TSconfig to return.
* @return array
*/
public function getModTSconfig($id, $TSref)
{
/** @noinspection PhpDeprecationInspection PhpUndefinedClassInspection */
return t3lib_BEfunc::getModTSconfig($id, $TSref);
}
示例8: menuConfig
/**
* Initializes the internal MOD_MENU array setting and unsetting items based on various conditions. It also merges in external menu items from the global array TBE_MODULES_EXT (see mergeExternalItems())
* Then MOD_SETTINGS array is cleaned up (see t3lib_BEfunc::getModuleData()) so it contains only valid values. It's also updated with any SET[] values submitted.
* Also loads the modTSconfig internal variable.
*
* @return void
* @see init(), $MOD_MENU, $MOD_SETTINGS, t3lib_BEfunc::getModuleData(), mergeExternalItems()
*/
function menuConfig()
{
// page/be_user TSconfig settings and blinding of menu-items
$this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.' . $this->MCONF['name']);
$this->MOD_MENU['function'] = $this->mergeExternalItems($this->MCONF['name'], 'function', $this->MOD_MENU['function']);
$this->MOD_MENU['function'] = t3lib_BEfunc::unsetMenuItems($this->modTSconfig['properties'], $this->MOD_MENU['function'], 'menu.function');
#debug($this->MOD_MENU['function'],$this->MCONF['name']);
#debug($this->modTSconfig['properties']);
$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name'], $this->modMenu_type, $this->modMenu_dontValidateList, $this->modMenu_setDefaultList);
}
示例9: init
/**
* Initialize internal variables.
*
* @return void
*/
function init()
{
global $BE_USER, $BACK_PATH, $TBE_MODULES_EXT;
// Setting class files to include:
if (is_array($TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses'])) {
$this->include_once = array_merge($this->include_once, $TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']);
}
$this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['templavoila']);
// Setting internal vars:
$this->id = intval(t3lib_div::_GP('id'));
$this->parentRecord = t3lib_div::_GP('parentRecord');
$this->altRoot = t3lib_div::_GP('altRoot');
$this->defVals = t3lib_div::_GP('defVals');
$this->returnUrl = t3lib_div::sanitizeLocalUrl(t3lib_div::_GP('returnUrl'));
// Starting the document template object:
$this->doc = t3lib_div::makeInstance('template');
$this->doc->docType = 'xhtml_trans';
$this->doc->backPath = $BACK_PATH;
$this->doc->setModuleTemplate('EXT:templavoila/resources/templates/mod1_new_content.html');
$this->doc->bodyTagId = 'typo3-mod-php';
$this->doc->divClass = '';
$this->doc->JScode = '';
$this->doc->getPageRenderer()->loadPrototype();
if (tx_templavoila_div::convertVersionNumberToInteger(TYPO3_version) < 4005000) {
$this->doc->JScodeLibArray['dyntabmenu'] = $this->doc->getDynTabMenuJScode();
} else {
$this->doc->loadJavascriptLib('js/tabmenu.js');
}
$this->doc->form = '<form action="" name="editForm">';
$tsconfig = t3lib_BEfunc::getModTSconfig($this->id, 'templavoila.wizards.newContentElement');
$this->config = $tsconfig['properties'];
// Getting the current page and receiving access information (used in main())
$perms_clause = $BE_USER->getPagePermsClause(1);
$pageinfo = t3lib_BEfunc::readPageAccess($this->id, $perms_clause);
$this->access = is_array($pageinfo) ? 1 : 0;
$this->apiObj = t3lib_div::makeInstance('tx_templavoila_api');
// If no parent record was specified, find one:
if (!$this->parentRecord) {
$mainContentAreaFieldName = $this->apiObj->ds_getFieldNameByColumnPosition($this->id, 0);
if ($mainContentAreaFieldName != FALSE) {
$this->parentRecord = 'pages:' . $this->id . ':sDEF:lDEF:' . $mainContentAreaFieldName . ':vDEF:0';
}
}
}
示例10: menuConfig
/**
* Initialize function menu array
*
* @return void
*/
function menuConfig()
{
// MENU-ITEMS:
$this->MOD_MENU = array('bigControlPanel' => '', 'clipBoard' => '', 'localization' => '');
// Loading module configuration:
$this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.' . $this->MCONF['name']);
// Clean up settings:
$this->MOD_SETTINGS = t3lib_BEfunc::getModuleData($this->MOD_MENU, t3lib_div::_GP('SET'), $this->MCONF['name']);
}
示例11: getResultsPerPage
/**
* Obtains amount of results per page for the given view.
*
* @param string $view
* @return int
*/
protected function getResultsPerPage($view) {
$tsConfig = t3lib_BEfunc::getModTSconfig($this->pObj->id, 'tx_realurl.' . $view . '.pagebrowser.resultsPerPage');
$resultsPerPage = $tsConfig['value'];
return tx_realurl::testInt($resultsPerPage) ? intval($resultsPerPage) : tx_realurl_pagebrowser::RESULTS_PER_PAGE_DEFAULT;
}
示例12: getLanguages
/**
* Returns sys_language records.
*
* @param integer $id Page id: If zero, the query will select all sys_language records from root level which are NOT hidden. If set to another value, the query will select all sys_language records that has a pages_language_overlay record on that page (and is not hidden, unless you are admin user)
* @param string $mode TYPO3_MODE to be used: 'FE', 'BE'. Constant TYPO3_MODE is default.
* @return array Language records including faked record for default language
*/
function getLanguages($id, $mode = TYPO3_MODE)
{
global $LANG;
static $cache = array();
$mode = $mode ? $mode : 'NONE';
if (is_array($cache[$mode])) {
return $cache[$mode];
}
$modSharedTSconfig = t3lib_BEfunc::getModTSconfig($id, 'mod.SHARED');
$languages = array(0 => array('uid' => 0, 'pid' => 0, 'hidden' => 0, 'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'] . ' (' . $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage') . ')' : $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage'), 'flag' => $modSharedTSconfig['properties']['defaultLanguageFlag']));
$exQ = ' AND sys_language.hidden=0';
if ($mode === 'BE' and $GLOBALS['BE_USER']->isAdmin()) {
$exQ = '';
}
if ($id) {
$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'pages_language_overlay,sys_language', 'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . intval($id) . $exQ, 'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag', 'sys_language.title');
} else {
$rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'sys_language', 'sys_language.hidden=0', '', 'sys_language.title');
}
if ($rows) {
if ($mode === 'BE') {
foreach ($rows as $row) {
if ($GLOBALS['BE_USER']->checkLanguageAccess($row['uid'])) {
$languages[$row['uid']] = $row;
}
}
} else {
foreach ($rows as $row) {
$languages[$row['uid']] = $row;
}
}
}
$cache[$mode] = $languages;
return $languages;
}
示例13: renderWizard_createNewPage
/**
* Creates the screen for "new page wizard"
*
* @param integer $positionPid: Can be positive and negative depending of where the new page is going: Negative always points to a position AFTER the page having the abs. value of the positionId. Positive numbers means to create as the first subpage to another page.
* @return string Content for the screen output.
* @todo Check required field(s), support t3d
*/
function renderWizard_createNewPage($positionPid)
{
global $LANG, $BE_USER, $TYPO3_CONF_VARS;
// The user already submitted the create page form:
if (t3lib_div::_GP('doCreate')) {
// Check if the HTTP_REFERER is valid
$refInfo = parse_url(t3lib_div::getIndpEnv('HTTP_REFERER'));
$httpHost = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');
if ($httpHost == $refInfo['host'] || t3lib_div::_GP('vC') == $BE_USER->veriCode() || $TYPO3_CONF_VARS['SYS']['doNotCheckReferer']) {
// Create new page
$newID = $this->createPage(t3lib_div::_GP('data'), $positionPid);
if ($newID > 0) {
// Get TSconfig for a different selection of fields in the editing form
$TSconfig = t3lib_BEfunc::getModTSconfig($newID, 'mod.web_txtemplavoilaM1.createPageWizard.fieldNames');
$fieldNames = isset($TSconfig['value']) ? $TSconfig['value'] : 'hidden,title,alias';
// Create parameters and finally run the classic page module's edit form for the new page:
$params = '&edit[pages][' . $newID . ']=edit&columnsOnly=' . rawurlencode($fieldNames);
$returnUrl = rawurlencode(t3lib_div::getIndpEnv('SCRIPT_NAME') . '?id=' . $newID . '&updatePageTree=1');
header('Location: ' . t3lib_div::locationHeaderUrl($this->doc->backPath . 'alt_doc.php?returnUrl=' . $returnUrl . $params));
exit;
} else {
debug('Error: Could not create page!');
}
} else {
debug('Error: Referer host did not match with server host.');
}
}
// Based on t3d/xml templates:
if (false != ($templateFile = t3lib_div::_GP('templateFile'))) {
if (t3lib_div::getFileAbsFileName($templateFile) && @is_file($templateFile)) {
// First, find positive PID for import of the page:
$importPID = t3lib_BEfunc::getTSconfig_pidValue('pages', '', $positionPid);
// Initialize the import object:
$import = $this->getImportObject();
if ($import->loadFile($templateFile, 1)) {
// Find the original page id:
$origPageId = key($import->dat['header']['pagetree']);
// Perform import of content
$import->importData($importPID);
// Find the new page id (root page):
$newID = $import->import_mapId['pages'][$origPageId];
if ($newID) {
// If the page was destined to be inserted after another page, move it now:
if ($positionPid < 0) {
$cmd = array();
$cmd['pages'][$newID]['move'] = $positionPid;
$tceObject = $import->getNewTCE();
$tceObject->start(array(), $cmd);
$tceObject->process_cmdmap();
}
// PLAIN COPY FROM ABOVE - BEGIN
// Get TSconfig for a different selection of fields in the editing form
$TSconfig = t3lib_BEfunc::getModTSconfig($newID, 'tx_templavoila.mod1.createPageWizard.fieldNames');
$fieldNames = isset($TSconfig['value']) ? $TSconfig['value'] : 'hidden,title,alias';
// Create parameters and finally run the classic page module's edit form for the new page:
$params = '&edit[pages][' . $newID . ']=edit&columnsOnly=' . rawurlencode($fieldNames);
$returnUrl = rawurlencode(t3lib_div::getIndpEnv('SCRIPT_NAME') . '?id=' . $newID . '&updatePageTree=1');
header('Location: ' . t3lib_div::locationHeaderUrl($this->doc->backPath . 'alt_doc.php?returnUrl=' . $returnUrl . $params));
exit;
// PLAIN COPY FROM ABOVE - END
} else {
debug('Error: Could not create page!');
}
}
}
}
// Start assembling the HTML output
$this->doc->form = '<form action="' . htmlspecialchars('index.php?id=' . $this->pObj->id) . '" method="post" autocomplete="off" enctype="' . $TYPO3_CONF_VARS['SYS']['form_enctype'] . '" onsubmit="return TBE_EDITOR_checkSubmit(1);">';
$this->doc->divClass = '';
$this->doc->getTabMenu(0, '_', 0, array('' => ''));
// init tceforms for javascript printing
$tceforms = t3lib_div::makeInstance('t3lib_TCEforms');
$tceforms->initDefaultBEMode();
$tceforms->backPath = $GLOBALS['BACK_PATH'];
$tceforms->doSaveFieldName = 'doSave';
// Setting up the context sensitive menu:
$CMparts = $this->doc->getContextMenuCode();
$this->doc->JScode .= $CMparts[0] . $tceforms->printNeededJSFunctions_top();
$this->doc->bodyTagAdditions = $CMparts[1];
$this->doc->postCode .= $CMparts[2] . $tceforms->printNeededJSFunctions();
$content .= $this->doc->header($LANG->sL('LLL:EXT:lang/locallang_core.xml:db_new.php.pagetitle'));
$content .= $this->doc->startPage($LANG->getLL('createnewpage_title'));
// Add template selectors
$tmplSelectorCode = '';
$tmplSelector = $this->renderTemplateSelector($positionPid, 'tmplobj');
if ($tmplSelector) {
# $tmplSelectorCode.='<em>'.$LANG->getLL ('createnewpage_templateobject_createemptypage').'</em>';
$tmplSelectorCode .= $this->doc->spacer(5);
$tmplSelectorCode .= $tmplSelector;
$tmplSelectorCode .= $this->doc->spacer(10);
}
$tmplSelector = $this->renderTemplateSelector($positionPid, 't3d');
if ($tmplSelector) {
//.........这里部分代码省略.........
示例14: getDisallowedTSconfigItemsByFieldName
/**
* Extract the disallowed TCAFORM field values of $fieldName given field
*
* @param integer $parentPageId
* @param string field name of TCAFORM
* @access private
* @return string comma seperated list of integer
*/
function getDisallowedTSconfigItemsByFieldName($positionPid, $fieldName)
{
$disallowPageTemplateItems = '';
$disallowPageTemplateList = array();
// Negative PID values is pointing to a page on the same level as the current.
if ($positionPid < 0) {
$pidRow = t3lib_BEfunc::getRecordWSOL('pages', abs($positionPid), 'pid');
$parentPageId = $pidRow['pid'];
} else {
$parentPageId = $positionPid;
}
// Get PageTSconfig for reduce the output of selectded template structs
$disallowPageTemplateStruct = t3lib_BEfunc::getModTSconfig(abs($parentPageId), 'TCEFORM.pages.' . $fieldName);
if (isset($disallowPageTemplateStruct['properties']['removeItems'])) {
$disallowedPageTemplateList = $disallowPageTemplateStruct['properties']['removeItems'];
}
$tmp_disallowedPageTemplateItems = array_unique(t3lib_div::intExplode(',', t3lib_div::expandList($disallowedPageTemplateList), TRUE));
return count($tmp_disallowedPageTemplateItems) ? implode(',', $tmp_disallowedPageTemplateItems) : '0';
}
示例15: loadModTSconfig
/**
* Get the linkvalidator modTSconfig for a page.
*
* @param integer $page: uid of the page.
* @return array $modTS: mod.linkvalidator TSconfig array.
*/
protected function loadModTSconfig($page)
{
$modTS = t3lib_BEfunc::getModTSconfig($page, 'mod.linkvalidator');
$parseObj = t3lib_div::makeInstance('t3lib_TSparser');
$parseObj->parse($this->configuration);
if (count($parseObj->errors) > 0) {
$parseErrorMessage = $GLOBALS['LANG']->sL('LLL:EXT:linkvalidator/locallang.xml:tasks.error.invalidTSconfig') . '<br />';
foreach ($parseObj->errors as $errorInfo) {
$parseErrorMessage .= $errorInfo[0] . '<br />';
}
throw new Exception($parseErrorMessage, '1295476989');
}
$TSconfig = $parseObj->setup;
$modTS = $modTS['properties'];
$overrideTs = $TSconfig['mod.']['tx_linkvalidator.'];
if (is_array($overrideTs)) {
$modTS = t3lib_div::array_merge_recursive_overrule($modTS, $overrideTs);
}
return $modTS;
}