本文整理汇总了PHP中t3lib_BEfunc::getRecordTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_BEfunc::getRecordTitle方法的具体用法?PHP t3lib_BEfunc::getRecordTitle怎么用?PHP t3lib_BEfunc::getRecordTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_BEfunc
的用法示例。
在下文中一共展示了t3lib_BEfunc::getRecordTitle方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: main
/**
* Entry function that hooks into the main typo3/alt_clickmenu.php,
* see ext_tables.php of this extension for more info
*
* @param $backRef the clickMenu object
* @param $menuItems the menuItems as an array that are already filled from the main clickmenu
* @param $table the table that is worked on (tx_dam_cat only)
* @param $uid the item UID that is worked on
* @return unknown
*/
function main(&$backRef, $menuItems, $table, $uid)
{
if ($table != 'tx_dam_cat') {
return $menuItems;
}
$this->backRef =& $backRef;
// Get record
$this->rec = t3lib_BEfunc::getRecordWSOL($table, $uid);
$menuItems = array();
$root = !strcmp($uid, '0') ? true : false;
if (is_array($this->rec) || $root) {
$lCP = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages', $root ? tx_dam_db::getPid() : $this->rec['pid']));
// Edit
if (!$root && $GLOBALS['BE_USER']->isPSet($lCP, $table, 'edit') && !in_array('edit', $this->backRef->disabledItems)) {
$menuItems['edit'] = $this->DAMcatEdit($table, $uid);
}
// New Category
if (!in_array('new', $this->backRef->disabledItems) && $GLOBALS['BE_USER']->isPSet($lCP, $table, 'new')) {
$menuItems['new'] = $this->DAMnewSubCat($table, $uid);
}
// Info
if (!in_array('info', $this->backRef->disabledItems) && !$root) {
$menuItems['info'] = $this->DAMcatInfo($table, $uid);
}
// Delete
$elInfo = array(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table, $this->rec), $GLOBALS['BE_USER']->uc['titleLen']));
if (!in_array('delete', $this->backRef->disabledItems) && !$root && $GLOBALS['BE_USER']->isPSet($lCP, $table, 'delete')) {
$menuItems['spacer2'] = 'spacer';
$menuItems['delete'] = $this->DAMcatDelete($table, $uid, $elInfo);
}
}
return $menuItems;
}
示例2: main
/**
* Main function
*
* @return void
*/
function main()
{
switch ((string) t3lib_div::_GET('cmd')) {
case 'menuitem':
echo '
<img src="gfx/x_t3logo.png" width="61" height="16" hspace="3" alt="" />';
$menuItems = array(array('title' => 'About TYPO3', 'xurl' => 'http://typo3.com/', 'subitems' => array(array('title' => 'License', 'xurl' => 'http://typo3.com/License.1625.0.html'), array('title' => 'Support', 'subitems' => array(array('title' => 'Mailing lists', 'xurl' => 'http://lists.netfielders.de/cgi-bin/mailman/listinfo'), array('title' => 'Documentation', 'xurl' => 'http://typo3.org/documentation/'), array('title' => 'Find consultancy', 'xurl' => 'http://typo3.com/Consultancies.1248.0.html'))), array('title' => 'Contribute', 'xurl' => 'http://typo3.org/community/participate/'), array('title' => 'Donate', 'xurl' => 'http://typo3.com/Donations.1261.0.html', 'icon' => '1'))), array('title' => 'Extensions', 'url' => 'mod/tools/em/index.php'), array('title' => 'Menu preferences and such things', 'onclick' => 'alert("A dialog is now shown which will allow user configuration of items in the menu");event.stopPropagation();', 'state' => 'checked'), array('title' => '--div--'), array('title' => 'Recent Items', 'id' => $this->id . '_recent', 'subitems' => array(), 'html' => $this->menuItemObject($this->id . '_recent', '
fetched: false,
onActivate: function() {
// if (!this.fetched) {
//Element.update("' . $this->id . '_recent-layer","asdfasdf");
getElementContent("' . $this->id . '_recent-layer", 0, "logomenu.php?cmd=recent")
this.fetched = true;
// }
}
')), array('title' => '--div--'), array('title' => 'View frontend', 'xurl' => t3lib_div::getIndpEnv('TYPO3_SITE_URL')), array('title' => 'Log out', 'onclick' => "top.document.location='logout.php';"));
echo $this->menuLayer($menuItems);
break;
case 'recent':
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_log.*, MAX(sys_log.tstamp) AS tstamp_MAX', 'sys_log,pages', 'pages.uid=sys_log.event_pid AND sys_log.userid=' . intval($GLOBALS['BE_USER']->user['uid']) . ' AND sys_log.event_pid>0 AND sys_log.type=1 AND sys_log.action=2 AND sys_log.error=0', 'tablename,recuid', 'tstamp_MAX DESC', 20);
$items = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$elRow = t3lib_BEfunc::getRecord($row['tablename'], $row['recuid']);
if (is_array($elRow)) {
$items[] = array('title' => t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($row['tablename'], $elRow), $GLOBALS['BE_USER']->uc['titleLen']) . ' - ' . t3lib_BEfunc::calcAge($GLOBALS['EXEC_TIME'] - $row['tstamp_MAX']), 'icon' => array(t3lib_iconworks::getIcon($row['tablename'], $elRow), 'width="18" height="16"'), 'onclick' => 'content.' . t3lib_BEfunc::editOnClick('&edit[' . $row['tablename'] . '][' . $row['recuid'] . ']=edit', '', 'dummy.php'));
}
}
echo $this->menuItems($items);
break;
}
}
示例3: transform
/**
* Transforms the rows for the deleted Records into the Array View necessary for ExtJS Ext.data.ArrayReader
*
* @param array $rows Array with table as key and array with all deleted rows
* @param integer $totalDeleted: Number of deleted records in total, for PagingToolbar
* @return string JSON Array
**/
public function transform($deletedRowsArray, $totalDeleted)
{
$total = 0;
$jsonArray = array('rows' => array());
// iterate
if (is_array($deletedRowsArray) && count($deletedRowsArray) > 0) {
foreach ($deletedRowsArray as $table => $rows) {
$total += count($deletedRowsArray[$table]);
foreach ($rows as $row) {
$backendUser = t3lib_BEfunc::getRecord('be_users', $row[$GLOBALS['TCA'][$table]['ctrl']['cruser_id']], 'username', '', FALSE);
$jsonArray['rows'][] = array('uid' => $row['uid'], 'pid' => $row['pid'], 'table' => $table, 'crdate' => date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $row[$GLOBALS['TCA'][$table]['ctrl']['crdate']]), 'tstamp' => date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $row[$GLOBALS['TCA'][$table]['ctrl']['tstamp']]), 'owner' => $backendUser['username'], 'owner_uid' => $row[$GLOBALS['TCA'][$table]['ctrl']['cruser_id']], 'tableTitle' => tx_recycler_helper::getUtf8String($GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title'])), 'title' => tx_recycler_helper::getUtf8String(t3lib_BEfunc::getRecordTitle($table, $row)), 'path' => tx_recycler_helper::getRecordPath($row['pid']));
}
}
}
$jsonArray['total'] = $totalDeleted;
return json_encode($jsonArray);
}
示例4: main
function main(&$backRef, $menuItems, $tableID, $srcId)
{
$this->includeLocalLang();
$this->backRef =& $backRef;
/**
* TODO
*
* FIXME
* backpath will not work in global installations
*/
if (($tableID == 'dragDrop_tt_news_cat' || $tableID == 'tt_news_cat_CM') && $srcId) {
$table = 'tt_news_cat';
$rec = t3lib_BEfunc::getRecordWSOL($table, $srcId);
// fetch page record to get editing permissions
$lCP = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages', $rec['pid']));
$doEdit = $lCP & 16;
//print_r( array($lCP));
if ($doEdit && $tableID == 'dragDrop_tt_news_cat') {
$this->backRef->backPath = '../../../';
$dstId = intval(t3lib_div::_GP('dstId'));
$menuItems['moveinto'] = $this->dragDrop_moveCategory($srcId, $dstId);
$menuItems['copyinto'] = $this->dragDrop_copyCategory($srcId, $dstId);
}
if ($tableID == 'tt_news_cat_CM') {
$this->backRef->backPath = '../../../../typo3/';
$menuItems = array();
if ($doEdit) {
$menuItems['edit'] = $this->DB_edit($table, $srcId);
$menuItems['new'] = $this->DB_new($table, $rec);
$menuItems['newsub'] = $this->DB_new($table, $rec, true);
}
$menuItems['info'] = $backRef->DB_info($table, $srcId);
if ($doEdit) {
$menuItems['hide'] = $this->DB_hideUnhide($table, $rec, 'hidden');
$elInfo = array(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle('tt_news_cat', $rec), $GLOBALS['BE_USER']->uc['titleLen']));
$menuItems['spacer2'] = 'spacer';
$menuItems['delete'] = $this->DB_delete($table, $srcId, $elInfo);
}
}
}
return $menuItems;
}
示例5: main
//.........这里部分代码省略.........
$sc_group = $row['sc_group'];
if ($sc_group && strcmp($formerGr, $sc_group)) {
if ($sc_group != -100) {
if ($this->groupLabels[abs($sc_group)] && strcmp('1', $this->groupLabels[abs($sc_group)])) {
$label = $this->groupLabels[abs($sc_group)];
} else {
$label = $LANG->getLL('shortcut_group_' . abs($sc_group), 1);
if (!$label) {
$label = $LANG->getLL('shortcut_group', 1) . ' ' . abs($sc_group);
}
// Fallback label
}
if ($sc_group >= 0) {
$onC = 'if (confirm(' . $GLOBALS['LANG']->JScharCode($LANG->getLL('shortcut_delAllInCat')) . ')){window.location.href=\'alt_shortcut.php?deleteCategory=' . $sc_group . '\';}return false;';
$this->linesPre[] = '<td> </td><td class="bgColor5"><a href="#" onclick="' . htmlspecialchars($onC) . '" title="' . $LANG->getLL('shortcut_delAllInCat', 1) . '">' . $label . '</a></td>';
} else {
$label = $LANG->getLL('shortcut_global', 1) . ': ' . ($label ? $label : abs($sc_group));
// Fallback label
$this->lines[] = '<td> </td><td class="bgColor5">' . $label . '</td>';
}
unset($label);
}
}
$bgColorClass = $row['uid'] == $this->editSC ? 'bgColor5' : ($row['sc_group'] < 0 ? 'bgColor6' : 'bgColor4');
if ($row['description'] && $row['uid'] != $this->editSC) {
$label = $row['description'];
} else {
$label = t3lib_div::fixed_lgd_cs(rawurldecode($qParts['query']), 150);
}
$titleA = $this->itemLabel($label, $row['module_name'], $row['M_module_name']);
$editSH = $row['sc_group'] >= 0 || $BE_USER->isAdmin() ? 'editSh(' . intval($row['uid']) . ');' : "alert('" . $LANG->getLL('shortcut_onlyAdmin') . "')";
$jumpSC = 'jump(unescape(\'' . rawurlencode($row['url']) . '\'),\'' . implode('_', $mParts) . '\',\'' . $mParts[0] . '\');';
$onC = 'if (document.shForm.editShortcut_check && document.shForm.editShortcut_check.checked){' . $editSH . '}else{' . $jumpSC . '}return false;';
if ($sc_group >= 0) {
// user defined groups show up first
$this->linesPre[] = '<td class="' . $bgColorClass . '"><a href="#" onclick="' . htmlspecialchars($onC) . '"><img src="' . $this->getIcon($row['module_name']) . '" title="' . htmlspecialchars($titleA) . '" alt="" /></a></td>';
} else {
$this->lines[] = '<td class="' . $bgColorClass . '"><a href="#" onclick="' . htmlspecialchars($onC) . '"><img src="' . $this->getIcon($row['module_name']) . '" title="' . htmlspecialchars($titleA) . '" alt="" /></a></td>';
}
if (trim($row['description'])) {
$kkey = strtolower(substr($row['description'], 0, 20)) . '_' . $row['uid'];
$this->selOpt[$kkey] = '<option value="' . htmlspecialchars($jumpSC) . '">' . htmlspecialchars(t3lib_div::fixed_lgd_cs($row['description'], 50)) . '</option>';
}
$formerGr = $row['sc_group'];
}
ksort($this->selOpt);
array_unshift($this->selOpt, '<option>[' . $LANG->getLL('shortcut_selSC', 1) . ']</option>');
$this->editLoadedFunc();
$this->editPageIdFunc();
if (!$this->editLoaded && t3lib_extMgm::isLoaded('cms')) {
$editIdCode = '<td nowrap="nowrap">' . $LANG->getLL('shortcut_editID', 1) . ': <input type="text" value="' . ($this->editError ? htmlspecialchars($this->editPage) : '') . '" name="editPage"' . $this->doc->formWidth(15) . ' onchange="submitEditPage(this.value);" />' . ($this->editError ? ' <strong><span class="typo3-red">' . htmlspecialchars($this->editError) . '</span></strong>' : '') . (is_array($this->theEditRec) ? ' <strong>' . $LANG->getLL('shortcut_loadEdit', 1) . ' \'' . t3lib_BEfunc::getRecordTitle('pages', $this->theEditRec, TRUE) . '\'</strong> (' . htmlspecialchars($this->editPath) . ')' : '') . ($this->searchFor ? ' ' . $LANG->getLL('shortcut_searchFor', 1) . ' <strong>\'' . htmlspecialchars($this->searchFor) . '\'</strong>' : '') . '</td>';
} else {
$editIdCode = '';
}
// Adding CSH:
$editIdCode .= '<td> ' . t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'shortcuts', $GLOBALS['BACK_PATH'], '', TRUE) . '</td>';
// Compile it all:
$this->content .= '
<table border="0" cellpadding="0" cellspacing="0" width="99%">
<tr>
<td>
<!--
Shortcut Display Table:
-->
<table border="0" cellpadding="0" cellspacing="2" id="typo3-shortcuts">
<tr>
';
if ($GLOBALS['BE_USER']->getTSConfigVal('options.enableShortcuts')) {
$this->content .= implode('
', $this->lines);
}
$this->content .= $editIdCode . '
</tr>
</table>
</td>
<td align="right">';
if ($this->hasWorkspaceAccess()) {
$this->content .= $this->workspaceSelector() . t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'workspaceSelector', $GLOBALS['BACK_PATH'], '', TRUE);
}
$this->content .= '
</td>
</tr>
</table>
';
// Launch Edit page:
if ($this->theEditRec['uid']) {
$this->content .= $this->doc->wrapScriptTags('top.loadEditId(' . $this->theEditRec['uid'] . ');');
}
// Load alternative table/uid into editing form.
if (count($this->alternativeTableUid) == 2 && isset($TCA[$this->alternativeTableUid[0]]) && t3lib_div::testInt($this->alternativeTableUid[1])) {
$JSaction = t3lib_BEfunc::editOnClick('&edit[' . $this->alternativeTableUid[0] . '][' . $this->alternativeTableUid[1] . ']=edit', '', 'dummy.php');
$this->content .= $this->doc->wrapScriptTags('function editArbitraryElement() { top.content.' . $JSaction . '; } editArbitraryElement();');
}
// Load search for something.
if ($this->searchFor) {
$firstMP = intval($GLOBALS['WEBMOUNTS'][0]);
$this->content .= $this->doc->wrapScriptTags('jump(unescape("' . rawurlencode('db_list.php?id=' . $firstMP . '&search_field=' . rawurlencode($this->searchFor) . '&search_levels=4') . '"),"web_list","web");');
}
}
示例6: renderDoktype_254
/**
* Displays the edit page screen if the currently selected page is of the doktype "Sysfolder"
*
* @param array $pageRecord: The current page record
* @return mixed HTML output from this submodule or FALSE if this submodule doesn't feel responsible
* @access public
*/
function renderDoktype_254($pageRecord)
{
global $LANG, $BE_USER, $TYPO3_CONF_VARS;
// Prepare the record icon including a content sensitive menu link wrapped around it:
$pageTitle = htmlspecialchars(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle('pages', $pageRecord), 50));
$recordIcon = t3lib_iconWorks::getSpriteIconForRecord('pages', $pageRecord);
$iconEdit = t3lib_iconWorks::getSpriteIcon('actions-document-open', array('title' => htmlspecialchars($LANG->sL('LLL:EXT:lang/locallang_mod_web_list.xml:editPage'))));
$editButton = $this->pObj->link_edit($iconEdit, 'pages', $pageRecord['uid']);
if ($this->userHasAccessToListModule()) {
if (tx_templavoila_div::convertVersionNumberToInteger(TYPO3_version) < 4005000) {
$listModuleURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir . 'db_list.php?id=' . intval($this->pObj->id);
} else {
$listModuleURL = t3lib_BEfunc::getModuleUrl('web_list', array('id' => intval($this->pObj->id)), '');
}
$onClick = "top.nextLoadModuleUrl='" . $listModuleURL . "';top.fsMod.recentIds['web']=" . intval($this->pObj->id) . ";top.goToModule('web_list',1);";
$listModuleLink = '<br /><br />' . t3lib_iconWorks::getSpriteIcon('actions-system-list-open') . '<strong><a href="#" onClick="' . $onClick . '">' . $LANG->getLL('editpage_sysfolder_switchtolistview', '', 1) . '</a></strong>
';
} else {
$listModuleLink = $LANG->getLL('editpage_sysfolder_listview_noaccess', '', 1);
}
$flashMessage = t3lib_div::makeInstance('t3lib_FlashMessage', $LANG->getLL('editpage_sysfolder_intro', '', 1), '', t3lib_FlashMessage::INFO);
$content = $flashMessage->render() . $listModuleLink;
return $content;
}
示例7: makeConfigurationForm
/**
* Create configuration form
*
* @param array Form configurat data
* @param array Table row accumulation variable. This is filled with table rows.
* @return void Sets content in $this->content
*/
function makeConfigurationForm($inData, &$row)
{
global $LANG;
$nameSuggestion = '';
// Page tree export options:
if (isset($inData['pagetree']['id'])) {
$nameSuggestion .= 'tree_PID' . $inData['pagetree']['id'] . '_L' . $inData['pagetree']['levels'];
$row[] = '
<tr class="tableheader bgColor5">
<td colspan="2">' . $LANG->getLL('makeconfig_exportPagetreeConfiguration', 1) . t3lib_BEfunc::cshItem('xMOD_tx_impexp', 'pageTreeCfg', $GLOBALS['BACK_PATH'], '') . '</td>
</tr>';
$row[] = '
<tr class="bgColor4">
<td><strong>' . $LANG->getLL('makeconfig_pageId', 1) . '</strong></td>
<td>' . htmlspecialchars($inData['pagetree']['id']) . '<input type="hidden" value="' . htmlspecialchars($inData['pagetree']['id']) . '" name="tx_impexp[pagetree][id]" /></td>
</tr>';
$row[] = '
<tr class="bgColor4">
<td><strong>' . $LANG->getLL('makeconfig_tree', 1) . '</strong>' . t3lib_BEfunc::cshItem('xMOD_tx_impexp', 'pageTreeDisplay', $GLOBALS['BACK_PATH'], '') . '</td>
<td>' . ($this->treeHTML ? $this->treeHTML : $LANG->getLL('makeconfig_noTreeExportedOnly', 1)) . '</td>
</tr>';
$opt = array('-2' => $LANG->getLL('makeconfig_tablesOnThisPage'), '-1' => $LANG->getLL('makeconfig_expandedTree'), '0' => $LANG->getLL('makeconfig_onlyThisPage'), '1' => $LANG->getLL('makeconfig_1Level'), '2' => $LANG->getLL('makeconfig_2Levels'), '3' => $LANG->getLL('makeconfig_3Levels'), '4' => $LANG->getLL('makeconfig_4Levels'), '999' => $LANG->getLL('makeconfig_infinite'));
$row[] = '
<tr class="bgColor4">
<td><strong>' . $LANG->getLL('makeconfig_levels', 1) . '</strong>' . t3lib_BEfunc::cshItem('xMOD_tx_impexp', 'pageTreeMode', $GLOBALS['BACK_PATH'], '') . '</td>
<td>' . $this->renderSelectBox('tx_impexp[pagetree][levels]', $inData['pagetree']['levels'], $opt) . '</td>
</tr>';
$row[] = '
<tr class="bgColor4">
<td><strong>' . $LANG->getLL('makeconfig_includeTables', 1) . '</strong>' . t3lib_BEfunc::cshItem('xMOD_tx_impexp', 'pageTreeRecordLimit', $GLOBALS['BACK_PATH'], '') . '</td>
<td>' . $this->tableSelector('tx_impexp[pagetree][tables]', $inData['pagetree']['tables'], 'pages') . '<br/>
' . $LANG->getLL('makeconfig_maxNumberOfRecords', 1) . '<br/>
<input type="text" name="tx_impexp[pagetree][maxNumber]" value="' . htmlspecialchars($inData['pagetree']['maxNumber']) . '"' . $this->doc->formWidth(10) . ' /><br/>
</td>
</tr>';
}
// Single record export:
if (is_array($inData['record'])) {
$row[] = '
<tr class="tableheader bgColor5">
<td colspan="2">' . $LANG->getLL('makeconfig_exportSingleRecord', 1) . t3lib_BEfunc::cshItem('xMOD_tx_impexp', 'singleRecord', $GLOBALS['BACK_PATH'], '') . '</td>
</tr>';
foreach ($inData['record'] as $ref) {
$rParts = explode(':', $ref);
$tName = $rParts[0];
$rUid = $rParts[1];
$nameSuggestion .= $tName . '_' . $rUid;
$rec = t3lib_BEfunc::getRecordWSOL($tName, $rUid);
$row[] = '
<tr class="bgColor4">
<td><strong>' . $LANG->getLL('makeconfig_record', 1) . '</strong></td>
<td>' . t3lib_iconworks::getSpriteIconForRecord($tName, $rec) . t3lib_BEfunc::getRecordTitle($tName, $rec, TRUE) . '<input type="hidden" name="tx_impexp[record][]" value="' . htmlspecialchars($tName . ':' . $rUid) . '" /></td>
</tr>';
}
}
// Single tables/pids:
if (is_array($inData['list'])) {
$row[] = '
<tr class="tableheader bgColor5">
<td colspan="2">' . $LANG->getLL('makeconfig_exportTablesFromPages', 1) . '</td>
</tr>';
$tblList = '';
foreach ($inData['list'] as $ref) {
$rParts = explode(':', $ref);
$tName = $rParts[0];
if ($GLOBALS['BE_USER']->check('tables_select', $tName)) {
$rec = t3lib_BEfunc::getRecordWSOL('pages', $rParts[1]);
$tblList .= 'Table "' . $tName . '" from ' . t3lib_iconworks::getSpriteIconForRecord('pages', $rec) . t3lib_BEfunc::getRecordTitle('pages', $rec, TRUE) . '<input type="hidden" name="tx_impexp[list][]" value="' . htmlspecialchars($ref) . '" /><br/>';
}
}
$row[] = '
<tr class="bgColor4">
<td><strong>' . $LANG->getLL('makeconfig_tablePids', 1) . '</strong>' . t3lib_BEfunc::cshItem('xMOD_tx_impexp', 'tableList', $GLOBALS['BACK_PATH'], '') . '</td>
<td>' . $tblList . '</td>
</tr>';
$row[] = '
<tr class="bgColor4">
<td><strong>' . $LANG->getLL('makeconfig_maxNumberOfRecords', 1) . t3lib_BEfunc::cshItem('xMOD_tx_impexp', 'tableListMaxNumber', $GLOBALS['BACK_PATH'], '') . '</strong></td>
<td>
<input type="text" name="tx_impexp[listCfg][maxNumber]" value="' . htmlspecialchars($inData['listCfg']['maxNumber']) . '"' . $this->doc->formWidth(10) . ' /><br/>
</td>
</tr>';
}
$row[] = '
<tr class="tableheader bgColor5">
<td colspan="2">' . $LANG->getLL('makeconfig_relationsAndExclusions', 1) . '</td>
</tr>';
// Add relation selector:
$row[] = '
<tr class="bgColor4">
<td><strong>' . $LANG->getLL('makeconfig_includeRelationsToTables', 1) . '</strong>' . t3lib_BEfunc::cshItem('xMOD_tx_impexp', 'inclRelations', $GLOBALS['BACK_PATH'], '') . '</td>
<td>' . $this->tableSelector('tx_impexp[external_ref][tables]', $inData['external_ref']['tables']) . '</td>
</tr>';
//.........这里部分代码省略.........
示例8: linkWrapItems
/**
* Returns the title (based on $code) of a record (from table $table) with the proper link around (that is for 'pages'-records a link to the level of that record...)
*
* @param string Table name
* @param integer Item uid
* @param string Item title (not htmlspecialchars()'ed yet)
* @param array Item row
* @return string The item title. Ready for HTML output (is htmlspecialchars()'ed)
*/
function linkWrapItems($table, $uid, $code, $row)
{
// Returns the title (based on $code) of a record (from table $table) with the proper link around (that is for "pages"-records a link to the level of that record...)
if (!strcmp($code, '')) {
$code = '<i>[' . $GLOBALS['LANG']->php3Lang['labels']['no_title'] . ']</i> - ' . t3lib_BEfunc::getRecordTitle($table, $row);
}
if ($table == 'pages') {
return '<a href="' . $this->listURL($uid) . '">' . $code . '</a>';
} else {
return $code;
// return '<a href="javascript:top.launchView(\''.$table.'\','.$uid.');">'.$code.'</a>'; // This launches the show_item-windows
}
}
示例9: linkWrapItems
/**
* Returns the title (based on $code) of a record (from table $table) with the proper link around (that is for "pages"-records a link to the level of that record...)
*
* @param string Table name
* @param integer UID (not used here)
* @param string Title string
* @param array Records array (from table name)
* @return string
*/
function linkWrapItems($table, $uid, $code, $row)
{
global $TCA, $BACK_PATH;
if (!$code) {
$code = '<i>[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.no_title', 1) . ']</i>';
} else {
$code = t3lib_BEfunc::getRecordTitlePrep($code, $this->fixedL);
}
$title = t3lib_BEfunc::getRecordTitle($table, $row, FALSE, TRUE);
$ficon = t3lib_iconWorks::getIcon($table, $row);
$aOnClick = "return insertElement('" . $table . "', '" . $row['uid'] . "', 'db', " . t3lib_div::quoteJSvalue($title) . ", '', '', '" . $ficon . "');";
$ATag = '<a href="#" onclick="' . $aOnClick . '">';
$ATag_alt = substr($ATag, 0, -4) . ',\'\',1);">';
$ATag_e = '</a>';
return $ATag . '<img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/plusbullet2.gif', 'width="18" height="16"') . ' title="' . $GLOBALS['LANG']->getLL('addToList', 1) . '" alt="" />' . $ATag_e . $ATag_alt . $code . $ATag_e;
}
示例10: export_addRecord
/**
* Adds the record $row from $table.
* No checking for relations done here. Pure data.
*
* @param string Table name
* @param array Record row.
* @param integer (Internal) if the record is added as a relation, this is set to the "level" it was on.
* @return void
*/
function export_addRecord($table, $row, $relationLevel = 0)
{
t3lib_BEfunc::workspaceOL($table, $row);
if (strcmp($table, '') && is_array($row) && $row['uid'] > 0 && !$this->excludeMap[$table . ':' . $row['uid']]) {
if ($this->checkPID($table === 'pages' ? $row['uid'] : $row['pid'])) {
if (!isset($this->dat['records'][$table . ':' . $row['uid']])) {
// Prepare header info:
$headerInfo = array();
$headerInfo['uid'] = $row['uid'];
$headerInfo['pid'] = $row['pid'];
$headerInfo['title'] = t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getRecordTitle($table, $row), 40);
$headerInfo['size'] = strlen(serialize($row));
if ($relationLevel) {
$headerInfo['relationLevel'] = $relationLevel;
}
// If record content is not too large in size, set the header content and add the rest:
if ($headerInfo['size'] < $this->maxRecordSize) {
// Set the header summary:
$this->dat['header']['records'][$table][$row['uid']] = $headerInfo;
// Create entry in the PID lookup:
$this->dat['header']['pid_lookup'][$row['pid']][$table][$row['uid']] = 1;
// Initialize reference index object:
$refIndexObj = t3lib_div::makeInstance('t3lib_refindex');
$refIndexObj->WSOL = TRUE;
// Yes to workspace overlays for exporting....
// Data:
$this->dat['records'][$table . ':' . $row['uid']] = array();
$this->dat['records'][$table . ':' . $row['uid']]['data'] = $row;
$this->dat['records'][$table . ':' . $row['uid']]['rels'] = $refIndexObj->getRelations($table, $row);
$this->errorLog = array_merge($this->errorLog, $refIndexObj->errorLog);
// Merge error logs.
// Add information about the relations in the record in the header:
$this->dat['header']['records'][$table][$row['uid']]['rels'] = $this->flatDBrels($this->dat['records'][$table . ':' . $row['uid']]['rels']);
// Add information about the softrefs to header:
$this->dat['header']['records'][$table][$row['uid']]['softrefs'] = $this->flatSoftRefs($this->dat['records'][$table . ':' . $row['uid']]['rels']);
} else {
$this->error('Record ' . $table . ':' . $row['uid'] . ' was larger than maxRecordSize (' . t3lib_div::formatSize($this->maxRecordSize) . ')');
}
} else {
$this->error('Record ' . $table . ':' . $row['uid'] . ' already added.');
}
} else {
$this->error('Record ' . $table . ':' . $row['uid'] . ' was outside your DB mounts!');
}
}
}
示例11: makeEditForm
//.........这里部分代码省略.........
$CALC_PERMS = $BE_USER->calcPerms($calcPRec);
$hasAccess = $CALC_PERMS & 2 ? 1 : 0;
$deleteAccess = $CALC_PERMS & 4 ? 1 : 0;
$this->viewId = $calcPRec['uid'];
} else {
$CALC_PERMS = $BE_USER->calcPerms(t3lib_BEfunc::getRecord('pages', $calcPRec['pid']));
// Fetching pid-record first.
$hasAccess = $CALC_PERMS & 16 ? 1 : 0;
$deleteAccess = $CALC_PERMS & 16 ? 1 : 0;
$this->viewId = $calcPRec['pid'];
// Adding "&L=xx" if the record being edited has a languageField with a value larger than zero!
if ($TCA[$table]['ctrl']['languageField'] && $calcPRec[$TCA[$table]['ctrl']['languageField']] > 0) {
$this->viewId_addParams = '&L=' . $calcPRec[$TCA[$table]['ctrl']['languageField']];
}
}
// Check internals regarding access:
if ($hasAccess) {
$hasAccess = $BE_USER->recordEditAccessInternals($table, $calcPRec);
$deniedAccessReason = $BE_USER->errorMsg;
}
} else {
$hasAccess = 0;
}
}
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck'] as $_funcRef) {
$_params = array('table' => $table, 'uid' => $theUid, 'cmd' => $cmd, 'hasAccess' => $hasAccess);
$hasAccess = t3lib_div::callUserFunction($_funcRef, $_params, $this);
}
}
// AT THIS POINT we have checked the access status of the editing/creation of records and we can now proceed with creating the form elements:
if ($hasAccess) {
$prevPageID = is_object($trData) ? $trData->prevPageID : '';
$trData = t3lib_div::makeInstance('t3lib_transferData');
$trData->addRawData = TRUE;
$trData->defVals = $this->defVals;
$trData->lockRecords = 1;
$trData->disableRTE = !$BE_USER->isRTE();
$trData->prevPageID = $prevPageID;
$trData->fetchRecord($table, $theUid, $cmd == 'new' ? 'new' : '');
// 'new'
reset($trData->regTableItems_data);
$rec = current($trData->regTableItems_data);
$rec['uid'] = $cmd == 'new' ? uniqid('NEW') : $theUid;
if ($cmd == 'new') {
$rec['pid'] = $theUid == 'prev' ? $thePrevUid : $theUid;
}
$this->elementsData[] = array('table' => $table, 'uid' => $rec['uid'], 'pid' => $rec['pid'], 'cmd' => $cmd, 'deleteAccess' => $deleteAccess);
// Now, render the form:
if (is_array($rec)) {
// Setting visual path / title of form:
$this->generalPathOfForm = $this->tceforms->getRecordPath($table, $rec);
if (!$this->storeTitle) {
$this->storeTitle = $this->recTitle ? htmlspecialchars($this->recTitle) : t3lib_BEfunc::getRecordTitle($table, $rec, TRUE);
}
// Setting variables in TCEforms object:
$this->tceforms->hiddenFieldList = '';
$this->tceforms->globalShowHelp = $this->disHelp ? 0 : 1;
if (is_array($this->overrideVals[$table])) {
$this->tceforms->hiddenFieldListArr = array_keys($this->overrideVals[$table]);
}
// Register default language labels, if any:
$this->tceforms->registerDefaultLanguageData($table, $rec);
// Create form for the record (either specific list of fields or the whole record):
$panel = '';
if ($this->columnsOnly) {
if (is_array($this->columnsOnly)) {
$panel .= $this->tceforms->getListedFields($table, $rec, $this->columnsOnly[$table]);
} else {
$panel .= $this->tceforms->getListedFields($table, $rec, $this->columnsOnly);
}
} else {
$panel .= $this->tceforms->getMainFields($table, $rec);
}
$panel = $this->tceforms->wrapTotal($panel, $rec, $table);
// Setting the pid value for new records:
if ($cmd == 'new') {
$panel .= '<input type="hidden" name="data[' . $table . '][' . $rec['uid'] . '][pid]" value="' . $rec['pid'] . '" />';
$this->newC++;
}
// Display "is-locked" message:
if ($lockInfo = t3lib_BEfunc::isRecordLocked($table, $rec['uid'])) {
$lockedMessage = t3lib_div::makeInstance('t3lib_FlashMessage', htmlspecialchars($lockInfo['msg']), '', t3lib_FlashMessage::WARNING);
t3lib_FlashMessageQueue::addMessage($lockedMessage);
}
// Combine it all:
$editForm .= $panel;
}
$thePrevUid = $rec['uid'];
} else {
$this->errorC++;
$editForm .= $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.noEditPermission', 1) . '<br /><br />' . ($deniedAccessReason ? 'Reason: ' . htmlspecialchars($deniedAccessReason) . '<br /><br />' : '');
}
}
}
}
}
}
return $editForm;
}
示例12: 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;
}
示例13: getRecordTitle
/**
* @param string $table Table name, present in TCA
* @param array $row Row from table
* @param bool $prep If set, result is prepared for output: The output is cropped to a limited length (depending on BE_USER->uc['titleLen']) and if no value is found for the title, '<em>[No title]</em>' is returned (localized). Further, the output is htmlspecialchars()'ed
* @param bool $forceResult If set, the function always returns an output. If no value is found for the title, '[No title]' is returned (localized).
* @return string
*/
public function getRecordTitle($table, $row, $prep = FALSE, $forceResult = TRUE)
{
/** @noinspection PhpDeprecationInspection PhpUndefinedClassInspection */
return t3lib_BEfunc::getRecordTitle($table, $row, $prep, $forceResult);
}
示例14: renderTO
/**
* Renders the display of Template Objects.
*
* @return void
*/
function renderTO() {
if (intval($this->displayUid)>0) {
$row = t3lib_BEfunc::getRecordWSOL('tx_templavoila_tmplobj',$this->displayUid);
if (is_array($row)) {
$tRows=array();
$tRows[]='
<tr class="bgColor5">
<td colspan="2"><strong>' . $GLOBALS['LANG']->getLL('renderTO_toDetails') . ':</strong>'.
$this->cshItem('xMOD_tx_templavoila','mapping_to',$this->doc->backPath,'').
'</td>
</tr>';
// Get title and icon:
$icon = t3lib_iconWorks::getSpriteIconForRecord('tx_templavoila_tmplobj', $row);
$title = t3lib_BEfunc::getRecordTitle('tx_templavoila_tmplobj', $row);
$title = t3lib_BEFunc::getRecordTitlePrep($GLOBALS['LANG']->sL($title));
$tRows[]='
<tr class="bgColor4">
<td>'.$GLOBALS['LANG']->getLL('templateObject').':</td>
<td>' . $this->doc->wrapClickMenuOnIcon($icon, 'tx_templavoila_tmplobj', $row['uid'], 1) . $title . '</td>
</tr>';
// Session data
$sessionKey = $this->MCONF['name'] . '_validatorInfo:' . $row['uid'];
$sesDat = array('displayFile' => $row['fileref']);
$GLOBALS['BE_USER']->setAndSaveSessionData($sessionKey, $sesDat);
// Find the file:
$theFile = t3lib_div::getFileAbsFileName($row['fileref'],1);
if ($theFile && @is_file($theFile)) {
$relFilePath = substr($theFile,strlen(PATH_site));
$onCl = 'return top.openUrlInWindow(\''.t3lib_div::getIndpEnv('TYPO3_SITE_URL').$relFilePath.'\',\'FileView\');';
$tRows[]='
<tr class="bgColor4">
<td rowspan="2">'.$GLOBALS['LANG']->getLL('templateFile').':</td>
<td><a href="#" onclick="'.htmlspecialchars($onCl).'">'.htmlspecialchars($relFilePath).'</a></td>
</tr>
<tr class="bgColor4">
<td>
<a href="#" onclick ="openValidator(\'' . $sessionKey . '\');return false;">
' . t3lib_iconWorks::getSpriteIcon('extensions-templavoila-htmlvalidate') . '
' . $GLOBALS['LANG']->getLL('validateTpl') . '
</a>
</td>
</tr>';
// Finding Data Structure Record:
$DSOfile='';
$dsValue = $row['datastructure'];
if ($row['parent']) {
$parentRec = t3lib_BEfunc::getRecordWSOL('tx_templavoila_tmplobj',$row['parent'],'datastructure');
$dsValue=$parentRec['datastructure'];
}
if (tx_templavoila_div::canBeInterpretedAsInteger($dsValue)) {
$DS_row = t3lib_BEfunc::getRecordWSOL('tx_templavoila_datastructure',$dsValue);
} else {
$DSOfile = t3lib_div::getFileAbsFileName($dsValue);
}
if (is_array($DS_row) || @is_file($DSOfile)) {
// Get main DS array:
if (is_array($DS_row)) {
// Get title and icon:
$icon = t3lib_iconWorks::getSpriteIconForRecord('tx_templavoila_datastructure',$DS_row);
$title = t3lib_BEfunc::getRecordTitle('tx_templavoila_datastructure', $DS_row);
$title = t3lib_BEFunc::getRecordTitlePrep($GLOBALS['LANG']->sL($title));
$tRows[]='
<tr class="bgColor4">
<td>' . $GLOBALS['LANG']->getLL('renderTO_dsRecord') . ':</td>
<td>' . $this->doc->wrapClickMenuOnIcon($icon, 'tx_templavoila_datastructure', $DS_row['uid'] , 1) . $title . '</td>
</tr>';
// Link to updating DS/TO:
$onCl = 'index.php?file=' . rawurlencode($theFile) . '&_load_ds_xml=1&_load_ds_xml_to=' . $row['uid'] . '&uid=' . $DS_row['uid'] . '&returnUrl=' . $this->returnUrl;
$onClMsg = '
if (confirm(' . $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL('renderTO_updateWarningConfirm')) . ')) {
document.location=\''.$onCl.'\';
}
return false;
';
$tRows[]='
<tr class="bgColor4">
<td> </td>
<td><input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('renderTO_editDSTO') . '" onclick="'.htmlspecialchars($onClMsg).'"/>'.
$this->cshItem('xMOD_tx_templavoila','mapping_to_modifyDSTO',$this->doc->backPath,'').
'</td>
</tr>';
// Read Data Structure:
$dataStruct = $this->getDataStructFromDSO($DS_row['dataprot']);
//.........这里部分代码省略.........
示例15: getTable_tt_content
/**
* Renders Content Elements from the tt_content table from page id
*
* @param integer Page id
* @return string HTML for the listing
*/
function getTable_tt_content($id)
{
global $TCA;
$this->initializeLanguages();
// Initialize:
$RTE = $GLOBALS['BE_USER']->isRTE();
$lMarg = 1;
$showHidden = $this->tt_contentConfig['showHidden'] ? '' : t3lib_BEfunc::BEenableFields('tt_content');
$pageTitleParamForAltDoc = '&recTitle=' . rawurlencode(t3lib_BEfunc::getRecordTitle('pages', t3lib_BEfunc::getRecordWSOL('pages', $id), TRUE));
$GLOBALS['SOBE']->doc->getPageRenderer()->loadExtJs();
$GLOBALS['SOBE']->doc->getPageRenderer()->addJsFile($GLOBALS['BACK_PATH'] . 'sysext/cms/layout/js/typo3pageModule.js');
// Get labels for CTypes and tt_content element fields in general:
$this->CType_labels = array();
foreach ($TCA['tt_content']['columns']['CType']['config']['items'] as $val) {
$this->CType_labels[$val[1]] = $GLOBALS['LANG']->sL($val[0]);
}
$this->itemLabels = array();
foreach ($TCA['tt_content']['columns'] as $name => $val) {
$this->itemLabels[$name] = $GLOBALS['LANG']->sL($val['label']);
}
// Select display mode:
if (!$this->tt_contentConfig['single']) {
// MULTIPLE column display mode, side by side:
// Setting language list:
$langList = $this->tt_contentConfig['sys_language_uid'];
if ($this->tt_contentConfig['languageMode']) {
if ($this->tt_contentConfig['languageColsPointer']) {
$langList = '0,' . $this->tt_contentConfig['languageColsPointer'];
} else {
$langList = implode(',', array_keys($this->tt_contentConfig['languageCols']));
}
$languageColumn = array();
}
$langListArr = explode(',', $langList);
$defLanguageCount = array();
$defLangBinding = array();
// For EACH languages... :
foreach ($langListArr as $lP) {
// If NOT languageMode, then we'll only be through this once.
$showLanguage = $this->defLangBinding && $lP == 0 ? ' AND sys_language_uid IN (0,-1)' : ' AND sys_language_uid=' . $lP;
$cList = explode(',', $this->tt_contentConfig['cols']);
$content = array();
$head = array();
// For EACH column, render the content into a variable:
foreach ($cList as $key) {
if (!$lP) {
$defLanguageCount[$key] = array();
}
// Select content elements from this column/language:
$queryParts = $this->makeQueryArray('tt_content', $id, 'AND colPos=' . intval($key) . $showHidden . $showLanguage);
$result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
// If it turns out that there are not content elements in the column, then display a big button which links directly to the wizard script:
if ($this->doEdit && $this->option_showBigButtons && !intval($key) && !$GLOBALS['TYPO3_DB']->sql_num_rows($result)) {
$onClick = "window.location.href='db_new_content_el.php?id=" . $id . '&colPos=' . intval($key) . '&sys_language_uid=' . $lP . '&uid_pid=' . $id . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . "';";
$theNewButton = $GLOBALS['SOBE']->doc->t3Button($onClick, $GLOBALS['LANG']->getLL('newPageContent'));
$content[$key] .= '<img src="clear.gif" width="1" height="5" alt="" /><br />' . $theNewButton;
}
// Traverse any selected elements and render their display code:
$rowArr = $this->getResult($result);
foreach ($rowArr as $rKey => $row) {
if (is_array($row) && (int) $row['t3ver_state'] != 2) {
$singleElementHTML = '';
if (!$lP) {
$defLanguageCount[$key][] = $row['uid'];
}
$editUidList .= $row['uid'] . ',';
$singleElementHTML .= $this->tt_content_drawHeader($row, $this->tt_contentConfig['showInfo'] ? 15 : 5, $this->defLangBinding && $lP > 0, TRUE);
$isRTE = $RTE && $this->isRTEforField('tt_content', $row, 'bodytext');
$singleElementHTML .= '<div ' . ($row['_ORIG_uid'] ? ' class="ver-element"' : '') . '>' . $this->tt_content_drawItem($row, $isRTE) . '</div>';
// NOTE: this is the end tag for <div class="t3-page-ce-body">
// because of bad (historic) conception, starting tag has to be placed inside tt_content_drawHeader()
$singleElementHTML .= '</div>';
$statusHidden = $this->isDisabled('tt_content', $row) ? ' t3-page-ce-hidden' : '';
$singleElementHTML = '<div class="t3-page-ce' . $statusHidden . '">' . $singleElementHTML . '</div>';
if ($this->defLangBinding && $this->tt_contentConfig['languageMode']) {
$defLangBinding[$key][$lP][$row[$lP ? 'l18n_parent' : 'uid']] = $singleElementHTML;
} else {
$content[$key] .= $singleElementHTML;
}
} else {
unset($rowArr[$rKey]);
}
}
// Add new-icon link, header:
$newP = $this->newContentElementOnClick($id, $key, $lP);
$head[$key] .= $this->tt_content_drawColHeader(t3lib_BEfunc::getProcessedValue('tt_content', 'colPos', $key), $this->doEdit && count($rowArr) ? '&edit[tt_content][' . $editUidList . ']=edit' . $pageTitleParamForAltDoc : '', $newP);
$editUidList = '';
}
// For EACH column, fit the rendered content into a table cell:
$out = '';
foreach ($cList as $k => $key) {
if (!$k) {
$out .= '
<td><img src="clear.gif" width="' . $lMarg . '" height="1" alt="" /></td>';
//.........这里部分代码省略.........