本文整理汇总了PHP中t3lib_iconWorks::getIconImage方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_iconWorks::getIconImage方法的具体用法?PHP t3lib_iconWorks::getIconImage怎么用?PHP t3lib_iconWorks::getIconImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_iconWorks
的用法示例。
在下文中一共展示了t3lib_iconWorks::getIconImage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIcon
/**
* Get icon for the row.
* If $this->iconPath and $this->iconName is set, try to get icon based on those values.
*
* @param array Item row.
* @return string Image tag.
*/
function getIcon($row)
{
$lConf =& $this->tt_news_obj->conf['displayCatMenu.'];
$catIconMode = intval($lConf['catmenuIconMode']);
if ($this->iconPath && $this->iconName) {
$icon = '<img' . t3lib_iconWorks::skinImg('', $this->iconPath . $this->iconName, 'width="18" height="16"') . ' alt="" />';
} else {
switch ($catIconMode) {
case 1:
// icon from cat db-record
if ($row['image']) {
$iconConf['image.']['file'] = 'uploads/pics/' . $row['image'];
}
break;
case 2:
// own icons
$iconConf['image.']['file'] = $lConf['catmenuIconPath'] . $lConf['catmenuIconFile'];
break;
case -1:
// no icons
$iconConf['image.']['file'] = '';
break;
}
if ($iconConf['image.']['file']) {
$iconConf['image.']['file.'] = $lConf['catmenuIconFile.'];
$icon = $GLOBALS['TSFE']->cObj->IMAGE($iconConf['image.']);
}
}
if (!$icon && !$catIconMode) {
$icon = t3lib_iconWorks::getIconImage($this->table, $row, $this->backPath, ' class="c-recIcon"');
}
return $this->wrapIcon($icon, $row);
}
示例2: workspaceList_getUserListWithAccess
/**
* Generates a list of user names that has access to the workspace.
*
* @param array A list of user IDs separated by comma
* @param string Access string
* @return string Generated content
*/
function workspaceList_getUserListWithAccess(&$list, $access)
{
$content_array = array();
if ($list != '') {
$userIDs = explode(',', $list);
// get user names and sort
$regExp = '/^(be_[^_]+)_(\\d+)$/';
$groups = false;
foreach ($userIDs as $userUID) {
$id = $userUID;
if (preg_match($regExp, $userUID)) {
$table = preg_replace($regExp, '\\1', $userUID);
$id = intval(preg_replace($regExp, '\\2', $userUID));
if ($table == 'be_users') {
// user
$icon = $GLOBALS['TCA']['be_users']['typeicons'][$this->be_user_Array[$id]['admin']];
if ($id == $GLOBALS['BE_USER']->user['uid']) {
// highlight current user
$tag0 = '<span class="ver-wl-current-user">';
$tag1 = '</span>';
} else {
$tag0 = $tag1 = '';
}
$content_array[] = $this->doc->wrapClickMenuOnIcon(t3lib_iconWorks::getIconImage($table, $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], ' align="middle" alt="UID: ' . $id . '"'), $table, $id, 2) . $tag0 . htmlspecialchars($this->be_user_Array_full[$id]['username']) . $tag1;
} else {
// group
if (false === $groups) {
$groups = t3lib_BEfunc::getGroupNames();
}
$content_array[] = $this->doc->wrapClickMenuOnIcon(t3lib_iconWorks::getIconImage($table, $groups[$id], $GLOBALS['BACK_PATH'], ' align="middle" alt="UID: ' . $id . '"'), $table, $id, 2) . $groups[$id]['title'];
}
} else {
// user id
if ($userUID == $GLOBALS['BE_USER']->user['uid']) {
// highlight current user
$tag0 = '<span class="ver-wl-current-user">';
$tag1 = '</span>';
} else {
$tag0 = $tag1 = '';
}
$content_array[] = t3lib_iconWorks::getIconImage('be_users', $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], ' align="middle" alt="UID: ' . $id . '"') . $tag0 . htmlspecialchars($this->be_user_Array_full[$userUID]['username']) . $tag1;
}
}
sort($content_array);
} else {
$content_array[] = ' –';
}
$content = '<tr><td class="ver-wl-details-label ver-wl-details-user-list-label">';
// TODO CSH lable explaining access here?
$content .= '<strong>' . $access . '</strong></td>';
$content .= '<td class="ver-wl-details">' . implode('<br />', $content_array) . '</td></tr>';
return $content;
}
示例3: getL10nAccumulatedInformationsObjectForLanguage
/**
* Factory method to create AccumulatedInformations Object (e.g. build tree etc...) (Factorys should have all dependencies passed as parameter)
*
* @param int $sysLang sys_language_uid
* @param mixed $overrideStartingPoint optional override startingpoint TODO!
* @return tx_l10nmgr_l10nAccumulatedInformations
**/
function getL10nAccumulatedInformationsObjectForLanguage($sysLang, $overrideStartingPoint = '')
{
$l10ncfg = $this->l10ncfg;
// Showing the tree:
// Initialize starting point of page tree:
$treeStartingPoint = intval($l10ncfg['depth'] == -1 ? t3lib_div::_GET('srcPID') : $l10ncfg['pid']);
$treeStartingRecord = t3lib_BEfunc::getRecordWSOL('pages', $treeStartingPoint);
$depth = $l10ncfg['depth'];
// Initialize tree object:
/** @var $tree t3lib_pageTree */
$tree = t3lib_div::makeInstance('t3lib_pageTree');
$tree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
$tree->addField('l18n_cfg');
// Creating top icon; the current page
$HTML = t3lib_iconWorks::getIconImage('pages', $treeStartingRecord, $GLOBALS['BACK_PATH'], 'align="top"');
$tree->tree[] = array('row' => $treeStartingRecord, 'HTML' => $HTML);
// Create the tree from starting point:
if ($depth > 0) {
$tree->getTree($treeStartingPoint, $depth, '');
}
//now create and init accum Info object:
/** @var $accumObj tx_l10nmgr_l10nAccumulatedInformations */
$accumObj = t3lib_div::makeInstance('tx_l10nmgr_l10nAccumulatedInformations', $tree, $l10ncfg, $sysLang);
return $accumObj;
}
示例4: statisticsLostRecords
/**
* Render statistics about lostrecords
*
* @return array array($countTotal, $content)
*/
function statisticsLostRecords()
{
global $LANG, $TCA;
$content = '';
$countTotal = 0;
// init table layout
$tableLayout = array('table' => array('<table border="0" cellspacing="1" cellpadding="2" style="width:auto;">', '</table>'), '0' => array('tr' => array('<tr class="bgColor2">', '</tr>'), 'defCol' => array('<td align="center">', '</td>')), 'defRow' => array('tr' => array('<tr class="bgColor3-20">', '</tr>'), '1' => array('<td align="center">', '</td>'), 'defCol' => array('<td>', '</td>')));
$tableOutput = array();
$tr = 0;
// add header row
$tableOutput[$tr][] = 'Table';
$tableOutput[$tr][] = 'Count';
$mediaTables = tx_dam::register_getEntries('mediaTable');
foreach ($mediaTables as $table) {
$count = 0;
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('COUNT(uid) as count', $table, $table . '.pid NOT IN (' . tx_dam_db::getPidList() . ')');
if ($res) {
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$count = $row['count'];
$countTotal += $count;
}
$title = is_array($TCA[$table]) ? $GLOBALS['LANG']->sl($TCA[$table]['ctrl']['title']) : $table;
$icon = t3lib_iconWorks::getIconImage($table, array(), $GLOBALS['BACK_PATH'], ' align="top"');
// add row to table
$tr++;
$tableOutput[$tr][] = $icon . $title . ' (' . $table . ')';
$tableOutput[$tr][] = $count;
}
$content .= $this->pObj->doc->table($tableOutput, $tableLayout);
return array($countTotal, $content);
}
示例5: getIconImage
/**
* Returns an icon image tag, 18x16 pixels, based on input information.
* This function is recommended to use in your backend modules.
* Usage: 60
*
* @param string The table name
* @param array The table row ("enablefields" are at least needed for correct icon display and for pages records some more fields in addition!)
* @param string The backpath to the main TYPO3 directory (relative path back to PATH_typo3)
* @param string Additional attributes for the image tag
* @param boolean If set, the icon will be grayed/shaded
* @return string <img>-tag
* @see getIcon()
*/
public function getIconImage($table, $row = array(), $backPath, $params = '', $shaded = FALSE)
{
/** @noinspection PhpDeprecationInspection PhpUndefinedClassInspection PhpUndefinedMethodInspection */
return t3lib_iconWorks::getIconImage($table, $row, $backPath, $params, $shaded);
}
示例6: renderL10nTable
/**
* Rendering the localization information table.
*
* @param array The Page tree data
* @return string HTML for the localization information table.
*/
function renderL10nTable(&$tree)
{
global $LANG;
// Title length:
$titleLen = $GLOBALS['BE_USER']->uc['titleLen'];
// Put together the TREE:
$output = '';
$newOL_js = array();
$langRecUids = array();
//Init DDD
$dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
if (version_compare(TYPO3_version, '4.3.0', '<')) {
$elementfactory = new tx_languagevisibility_elementFactory($dao);
} else {
$elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
}
$languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
$languageList = $languageRep->getLanguages();
$visibility = t3lib_div::makeInstance('tx_languagevisibility_visibilityService');
//traverse Tree:
foreach ($tree->tree as $data) {
$tCells = array();
$element = $elementfactory->getElementForTable('pages', $data['row']['uid']);
//first cell (tree):
// Page icons / titles etc.
$tCells[] = '<td' . ($data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '') . '>' . $data['HTML'] . htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['title'], $titleLen)) . (strcmp($data['row']['nav_title'], '') ? ' [Nav: <em>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['nav_title'], $titleLen)) . '</em>]' : '') . '</td>';
//language cells:
foreach ($languageList as $language) {
$info = '';
$editUid = $data['row']['uid'];
$params = '&edit[pages][' . $editUid . ']=edit';
$langId = $language->getUid();
if ($visibility->isVisible($language, $element)) {
$isVisible = TRUE;
$statusVis = 'c-visible';
} else {
$isVisible = FALSE;
$statusVis = 'c-notvisible';
}
if ($element->hasTranslation($langId)) {
$statusTrans = 'c-translated';
} else {
$statusTrans = 'c-nottranslated';
}
if ($language->getUid() == 0) {
//Default
//"View page" link is created:
$viewPageLink = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($data['row']['uid'], $GLOBALS['BACK_PATH'], '', '', '', '&L=###LANG_UID###')) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/zoom.gif', 'width="12" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_viewPage', '1') . '" border="0" alt="" />' . '</a>';
$info .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_editDefaultLanguagePage', '1') . '" border="0" alt="" />' . '</a>';
$info .= '<a href="#" onclick="' . htmlspecialchars('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=0"); return false;') . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit_page.gif', 'width="12" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_editPage', '1') . '" border="0" alt="" />' . '</a>';
$info .= str_replace('###LANG_UID###', '0', $viewPageLink);
$info .= $data['row']['l18n_cfg'] & 1 ? '<span title="' . $LANG->sL('LLL:EXT:cms/locallang_tca.php:pages.l18n_cfg.I.1', '1') . '">D</span>' : ' ';
// Put into cell:
$tCells[] = '<td class="' . $statusTrans . ' c-leftLine">' . $info . '</td>';
$tCells[] = '<td class="' . $statusTrans . '" title="' . $LANG->getLL('lang_renderl10n_CEcount', '1') . '" align="center">' . $this->getContentElementCount($data['row']['uid'], 0) . '</td>';
} else {
//Normal Language:
if ($element->hasTranslation($langId)) {
$status = 'c-ok';
$overLayRow = $element->getOverLayRecordForCertainLanguage($langId);
//add uid of overlay to list of editable records:
$langRecUids[$langId][] = $overLayRow['uid'];
$icon = t3lib_iconWorks::getIconImage('pages_language_overlay', $overLayRow, $GLOBALS['BACK_PATH'], 'align="top" class="c-recIcon"');
$info = $icon . htmlspecialchars(t3lib_div::fixed_lgd_cs($overLayRow['title'], $titleLen)) . (strcmp($overLayRow['nav_title'], '') ? ' [Nav: <em>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($overLayRow['nav_title'], $titleLen)) . '</em>]' : '') . ($row['_COUNT'] > 1 ? '<div>' . $LANG->getLL('lang_renderl10n_badThingThereAre', '1') . '</div>' : '');
$tCells[] = '<td class="' . $statusTrans . ' c-leftLine">' . $info . '</td>';
// Edit whole record:
$info = '';
$editUid = $overLayRow['uid'];
$params = '&edit[pages_language_overlay][' . $editUid . ']=edit';
$info .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_editLanguageOverlayRecord', '1') . '" border="0" alt="" />' . '</a>';
$info .= '<a href="#" onclick="' . htmlspecialchars('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=' . $langId . '"); return false;') . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit_page.gif', 'width="12" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_editPageLang', '1') . '" border="0" alt="" />' . '</a>';
$info .= str_replace('###LANG_UID###', $langId, $viewPageLink);
$tCells[] = '<td class="' . $statusTrans . '">' . $info . '</td>';
$tCells[] = '<td class="' . $statusTrans . '" title="' . $LANG->getLL('lang_renderl10n_CEcount', '1') . '" align="center">' . $this->getContentElementCount($data['row']['uid'], $langId) . '</td>';
} else {
$status = t3lib_div::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg'] & 1 ? 'c-blocked' : 'c-fallback';
$tCells[] = '<td class="' . $statusTrans . ' c-leftLine"> </td>';
$tCells[] = '<td class="' . $statusTrans . '"> </td>';
//add to JS
$infoCell = '<input type="checkbox" name="newOL[' . $langId . '][' . $data['row']['uid'] . ']" value="1" />';
$newOL_js[$langId] .= '
+(document.webinfoForm[\'newOL[' . $langId . '][' . $data['row']['uid'] . ']\'].checked ? \'&edit[pages_language_overlay][' . $data['row']['uid'] . ']=new\' : \'\')
';
$tCells[] = '<td class="' . $statusTrans . '">' . $infoCell . '</td>';
}
}
//last cell show status
$tCells[] = '<td class="' . $statusVis . '">' . $this->_getStatusImage($isVisible) . '</td>';
}
$output .= '
<tr class="bgColor5">
' . implode('
', $tCells) . '
</tr>';
//.........这里部分代码省略.........
示例7: main
/**
* Main function, adding items to the click menu array.
*
* @param object Reference to the parent object of the clickmenu class which calls this function
* @param array The current array of menu items - you have to add or remove items to this array in this function. Thats the point...
* @param string The database table OR filename
* @param integer For database tables, the UID
* @return array The modified menu array.
*/
function main(&$backRef, $menuItems, $table, $uid)
{
global $BE_USER, $LANG, $TYPO3_DB;
$localItems = array();
if (!$backRef->cmLevel) {
$LL = $LANG->includeLLFile(t3lib_extMgm::extPath('templavoila') . 'locallang.xml', 0);
// Adding link for Mapping tool:
if (@is_file($table)) {
if ($BE_USER->isAdmin()) {
if (function_exists('finfo_open')) {
$fi = finfo_open(FILEINFO_MIME);
$enabled = @finfo_file($fi, $table) == 'text/html';
finfo_close($fi);
} else {
$pi = @pathinfo($table);
$enabled = preg_match('/(html?|tmpl)/', $pi['extension']);
}
if ($enabled) {
$url = t3lib_extMgm::extRelPath('templavoila') . 'cm1/index.php?file=' . rawurlencode($table);
$localItems[] = $backRef->linkItem($LANG->getLLL('cm1_title', $LL, 1), $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('templavoila') . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
}
}
} elseif (t3lib_div::inList('tx_templavoila_tmplobj,tx_templavoila_datastructure,tx_templavoila_content', $table)) {
$url = t3lib_extMgm::extRelPath('templavoila') . 'cm1/index.php?table=' . rawurlencode($table) . '&uid=' . $uid . '&_reload_from=1';
$localItems[] = $backRef->linkItem($LANG->getLLL('cm1_title', $LL, 1), $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('templavoila') . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
}
$isTVelement = ('tt_content' == $table && $backRef->rec['CType'] == 'templavoila_pi1' || 'pages' == $table) && $backRef->rec['tx_templavoila_flex'];
// Adding link for "View: Sub elements":
if ($table == 'tt_content' && $isTVelement) {
$localItems = array();
$url = t3lib_extMgm::extRelPath('templavoila') . 'mod1/index.php?id=' . intval($backRef->rec['pid']) . '&altRoot[table]=' . rawurlencode($table) . '&altRoot[uid]=' . $uid . '&altRoot[field_flex]=tx_templavoila_flex';
$localItems[] = $backRef->linkItem($LANG->getLLL('cm1_viewsubelements', $LL, 1), $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('templavoila') . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
}
// Adding link for "View: Flexform XML" (admin only):
if ($BE_USER->isAdmin() && $isTVelement) {
$url = t3lib_extMgm::extRelPath('templavoila') . 'cm2/index.php?' . '&viewRec[table]=' . rawurlencode($table) . '&viewRec[uid]=' . $uid . '&viewRec[field_flex]=tx_templavoila_flex';
$localItems[] = $backRef->linkItem($LANG->getLLL('cm1_viewflexformxml', $LL, 1), $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('templavoila') . 'cm2/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
}
// Adding link for "View: DS/TO" (admin only):
if ($BE_USER->isAdmin() && $isTVelement) {
if (t3lib_div::testInt($backRef->rec['tx_templavoila_ds'])) {
$url = t3lib_extMgm::extRelPath('templavoila') . 'cm1/index.php?' . 'table=tx_templavoila_datastructure&uid=' . $backRef->rec['tx_templavoila_ds'];
$localItems[] = $backRef->linkItem($LANG->getLLL('cm_viewdsto', $LL, 1) . ' [' . $backRef->rec['tx_templavoila_ds'] . '/' . $backRef->rec['tx_templavoila_to'] . ']', $backRef->excludeIcon('<img src="' . $backRef->backPath . t3lib_extMgm::extRelPath('templavoila') . 'cm2/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
}
}
# if ($table=='tt_content') {
# // Adding link for "Pages using this element":
# $localItems[] = $backRef->linkItem(
# $LANG->getLLL('cm1_pagesusingthiselement',$LL),
# $backRef->excludeIcon('<img src="'.t3lib_extMgm::extRelPath('templavoila').'cm1/cm_icon_activate.gif" width="15" height="12" border=0 align=top>'),
# "top.loadTopMenu('".t3lib_div::linkThisScript()."&cmLevel=1&subname=tx_templavoila_cm1_pagesusingthiselement');return false;",
# 0,
# 1
# );
# }
} else {
if (t3lib_div::GPvar('subname') == 'tx_templavoila_cm1_pagesusingthiselement') {
$menuItems = array();
$url = t3lib_extMgm::extRelPath('templavoila') . 'mod1/index.php?id=';
// Generate a list of pages where this element is also being used:
$res = $TYPO3_DB->exec_SELECTquery('*', 'tx_templavoila_elementreferences', 'uid=' . $backRef->rec['uid']);
if ($res) {
while (false != ($referenceRecord = $TYPO3_DB->sql_fetch_assoc($res))) {
$pageRecord = t3lib_beFunc::getRecord('pages', $referenceRecord['pid']);
$icon = t3lib_iconWorks::getIconImage('pages', $pageRecord, $backRef->backPath);
// To do: Display language flag icon and jump to correct language
# if ($referenceRecord['lkey'] != 'lDEF') {
# $icon .= ' lKey:'.$referenceRecord['lkey'];
# } elseif ($referenceRecord['vkey'] != 'vDEF') {
# $icon .= ' vKey:'.$referenceRecord['vkey'];
# }
if (is_array($pageRecord)) {
$menuItems[] = $backRef->linkItem($icon, t3lib_beFunc::getRecordTitle('pages', $pageRecord, 1), $backRef->urlRefForCM($url . $pageRecord['uid']), 1);
}
}
}
}
}
// Simply merges the two arrays together and returns ...
if (count($localItems)) {
$menuItems = array_merge($menuItems, $localItems);
}
return $menuItems;
}
示例8: getItemColumns
/**
* Renders the data columns
*
* @param array $item item array
* @return array
*/
function getItemColumns($item)
{
// Columns rendering
$columns = array();
foreach ($this->columnList as $field => $descr) {
switch ($field) {
case 'page':
// Create output item for pages record
$pageRow = $item[$field];
$rootline = t3lib_BEfunc::BEgetRootLine($pageRow['uid']);
$pageOnClick = t3lib_BEfunc::viewOnClick($pageRow['uid'], $GLOBALS['BACK_PATH'], $rootline);
$iconAltText = t3lib_BEfunc::getRecordIconAltText($pageRow, 'pages');
$icon = t3lib_iconWorks::getIconImage('pages', $pageRow, $GLOBALS['BACK_PATH'], 'title="' . $iconAltText . '" align="top"');
if ($this->showRootline) {
$title = t3lib_BEfunc::getRecordPath($pageRow['uid'], '1=1', 0);
$title = t3lib_div::fixed_lgd_cs($title, -$GLOBALS['BE_USER']->uc['titleLen']);
} else {
$title = t3lib_BEfunc::getRecordTitle('pages', $pageRow, TRUE);
}
if ($pageRow['doktype'] == 1 || $pageRow['doktype'] == 6) {
if ($this->enableContextMenus) {
$columns[$field] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($icon, 'pages', $pageRow['uid'], 1, '', '+view,edit,info') . $title;
} else {
$columns[$field] = '<a href="#" onclick="' . htmlspecialchars($pageOnClick) . '">' . $icon . $title . '</a>';
}
} else {
if ($this->enableContextMenus) {
$columns[$field] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($icon, 'pages', $pageRow['uid'], 1, '', '+edit,info') . $title;
} else {
$columns[$field] = $icon . $title;
}
}
break;
case 'content_element':
// Create output item for content record
$refTable = $item['tablenames'];
$refRow = $item[$field];
if ($refTable == 'pages') {
// The reference to the media is on a field of a page record
if ($GLOBALS['BE_USER']->isInWebMount($refRow['uid']) && $GLOBALS['BE_USER']->doesUserHaveAccess($refRow, 1)) {
$columns[$field] = tx_dam_SCbase::getRecordInfoEditLink($refTable, $refRow);
} else {
$pageRow = $refRow;
$rootline = t3lib_BEfunc::BEgetRootLine($pageRow['uid']);
$pageOnClick = t3lib_BEfunc::viewOnClick($pageRow['uid'], $GLOBALS['BACK_PATH'], $rootline);
$iconAltText = t3lib_BEfunc::getRecordIconAltText($refRow, $refTable);
$icon = t3lib_iconworks::getIconImage($refTable, $refRow, $GLOBALS['BACK_PATH'], 'class="c-recicon" align="top" title="' . $iconAltText . '"');
$title = t3lib_BEfunc::getRecordTitle($refTable, $refRow, 1);
if ($pageRow['doktype'] == 1 || $pageRow['doktype'] == 6) {
$columns[$field] = '<a href="#" onclick="' . htmlspecialchars($pageOnClick) . '">' . $icon . $title . '</a>';
} else {
$columns[$field] = $icon . $title;
}
}
} else {
// The reference to the media is on a field of a content element record
if ($GLOBALS['BE_USER']->isInWebMount($pageRow['uid']) && $GLOBALS['BE_USER']->doesUserHaveAccess($pageRow, 1)) {
$columns[$field] = tx_dam_SCbase::getRecordInfoEditLink($refTable, $refRow);
} else {
$pageRow = $item['page'];
$rootline = t3lib_BEfunc::BEgetRootLine($pageRow['uid']);
$pageOnClick = t3lib_BEfunc::viewOnClick($pageRow['uid'], $GLOBALS['BACK_PATH'], $rootline);
$iconAltText = t3lib_BEfunc::getRecordIconAltText($refRow, $refTable);
$icon = t3lib_iconworks::getIconImage($refTable, $refRow, $GLOBALS['BACK_PATH'], 'class="c-recicon" align="top" title="' . $iconAltText . '"');
$title = t3lib_BEfunc::getRecordTitle($refTable, $refRow, 1);
if ($pageRow['doktype'] == 1 || $pageRow['doktype'] == 6) {
$columns[$field] = '<a href="#" onclick="' . htmlspecialchars($pageOnClick) . '">' . $icon . $title . '</a>';
} else {
$columns[$field] = $icon . $title;
}
}
}
break;
case 'content_field':
// Create output item for reference field
$columns[$field] = $item[$field];
break;
case 'softref_key':
// Create output item for reference key
$columns[$field] = $item['softref_key'] ? $GLOBALS['LANG']->sl('LLL:EXT:dam/lib/locallang.xml:softref_key_' . $item['softref_key']) : $GLOBALS['LANG']->sl('LLL:EXT:dam/lib/locallang.xml:softref_key_media');
break;
case 'content_age':
// Create output text describing the age of the content element
$columns[$field] = t3lib_BEfunc::dateTimeAge($item[$field], 1);
break;
case 'media_element':
// Create output item for tx_dam record
$columns[$field] = tx_dam_SCbase::getRecordInfoEditLink('tx_dam', $item);
break;
case 'media_element_age':
// Create output text describing the tx_dam record age
$columns[$field] = t3lib_BEfunc::dateTimeAge($item['tstamp'], 1);
break;
case '_CLIPBOARD_':
//.........这里部分代码省略.........
示例9: main
/**
* Creating the module output.
*
* @return void
* @todo provide position mapping if no position is given already. Like the columns selector but for our cascading element style ...
*/
function main()
{
global $LANG, $BACK_PATH, $BE_USER;
if ($this->id && $this->access) {
// Creating content
$this->content = '';
$this->content .= $this->doc->startPage($LANG->getLL('newContentElement'));
$this->content .= $this->doc->header($LANG->getLL('newContentElement'));
$this->content .= $this->doc->spacer(5);
$elRow = t3lib_BEfunc::getRecordWSOL('pages', $this->id);
$header = t3lib_iconWorks::getIconImage('pages', $elRow, $BACK_PATH, ' title="' . htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($elRow, 'pages')) . '" align="top"');
$header .= t3lib_BEfunc::getRecordTitle('pages', $elRow, 1);
$this->content .= $this->doc->section('', $header, 0, 1);
$this->content .= $this->doc->spacer(10);
// Wizard
$wizardCode = '';
$tableRows = array();
$wizardItems = $this->getWizardItems();
// Traverse items for the wizard.
// An item is either a header or an item rendered with a title/description and icon:
$counter = 0;
// #
// ### Mansoor Ahmad @ Gosign media. GmbH - Set it for ...
// #
$ignoreList = 'list,templavoila_pi1';
foreach ($wizardItems as $key => $wizardItem) {
if ($wizardItem['header']) {
if ($counter > 0) {
$tableRows[] = '
<tr>
<td colspan="3"><br /></td>
</tr>';
}
$tableRows[] = '
<tr class="bgColor5">
<td colspan="3"><strong>' . htmlspecialchars($wizardItem['header']) . '</strong></td>
</tr>';
} else {
$tableLinks = array();
// href URI for icon/title:
$newRecordLink = 'index.php?' . $this->linkParams() . '&createNewRecord=' . rawurlencode($this->parentRecord) . $wizardItem['params'];
// Icon:
$iInfo = @getimagesize($wizardItem['icon']);
$tableLinks[] = '<a href="' . $newRecordLink . '"><img' . t3lib_iconWorks::skinImg($this->doc->backPath, $wizardItem['icon'], '') . ' alt="" /></a>';
// Title + description:
$tableLinks[] = '<a href="' . $newRecordLink . '"><strong>' . htmlspecialchars($wizardItem['title']) . '</strong><br />' . nl2br(htmlspecialchars(trim($wizardItem['description']))) . '</a>';
// Finally, put it together in a table row:
// #
// ### Mansoor Ahmad @ Gosign media. GmbH - start
// #
//print_r($wizardItems);
$actionForm = 'db_new_content_el.php?' . $this->linkParams() . '&parentRecord=' . t3lib_div::GPvar('parentRecord');
if (t3lib_div::GPvar('count') == $counter && t3lib_div::GPvar('go_backend_layout_edit') == 1) {
$tableRows[] = '
<tr>
<td valign="top" colspan="3">' . $this->getEditTable($wizardItem, $actionForm) . '
<a name="' . $wizardItem['tt_content_defValues']['CType'] . '" />
</td>
</tr>';
} else {
$tableRows[] = '
<tr>
<td valign="top"><a name="' . $wizardItem['tt_content_defValues']['CType'] . '" />' . implode('</td>
<td valign="top">', $tableLinks) . '</td>
<td valign="top">' . ($BE_USER->isAdmin() && !in_array($wizardItem['tt_content_defValues']['CType'], explode(',', $ignoreList)) ? '<a href="db_new_content_el.php?' . $this->linkParams() . '&parentRecord=' . t3lib_div::GPvar('parentRecord') . '&go_backend_layout_edit=1&count=' . $counter . '#' . $wizardItem['tt_content_defValues']['CType'] . '"><img src="../../../../typo3/sysext/t3skin/icons/gfx/edit2.gif" /></a>' : '') . '</td>
</tr>';
$editData = array('CType' => t3lib_div::GPvar('CType'), 'title' => t3lib_div::GPvar('title'), 'desc' => t3lib_div::GPvar('desc'));
if ($editData['CType'] == $wizardItem['tt_content_defValues']['CType']) {
$this->saveEditTableData($editData, $wizardItem);
} elseif (t3lib_div::GPvar('submit')) {
header('location:' . $actionForm . '#' . t3lib_div::GPvar('CType'));
}
}
// #
// ### Mansoor Ahmad @ Gosign media. GmbH - end
// #
$counter++;
}
}
// Add the wizard table to the content:
$wizardCode .= $LANG->getLL('sel1', 1) . '<br /><br />
<!--
Content Element wizard table:
-->
<table border="0" cellpadding="1" cellspacing="2" id="typo3-ceWizardTable" style="float:left;">
' . implode('', $tableRows) . '
</table>
';
$this->content .= $this->doc->section($LANG->getLL('1_selectType'), $wizardCode, 0, 1);
} else {
// In case of no access:
$this->content = '';
$this->content .= $this->doc->startPage($LANG->getLL('newContentElement'));
//.........这里部分代码省略.........
示例10: main
/**
* Main function
*
* @return string Output HTML for the module.
* @access public
*/
function main()
{
global $BACK_PATH, $LANG, $SOBE, $BE_USER, $TYPO3_DB;
$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::getIconImage('pages', $treeStartingRecord, $GLOBALS['BACK_PATH'], 'align="top"');
$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;
}
示例11: pageTree
/**
* Return a page tree
*
* @param integer $pageUid page to start with
* @param integer $treeLevel count of levels
* @return t3lib_pageTree
* @throws Exception
*/
public static function pageTree($pageUid, $treeLevel)
{
if (TYPO3_MODE !== 'BE') {
throw new Exception('Page::pageTree does only work in the backend!');
}
/* @var $tree t3lib_pageTree */
$tree = t3lib_div::makeInstance('t3lib_pageTree');
$tree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
$treeStartingRecord = t3lib_BEfunc::getRecord('pages', $pageUid);
t3lib_BEfunc::workspaceOL('pages', $treeStartingRecord);
// Creating top icon; the current page
$tree->tree[] = array('row' => $treeStartingRecord, 'HTML' => t3lib_iconWorks::getIconImage('pages', $treeStartingRecord, $GLOBALS['BACK_PATH'], 'align="top"'));
$tree->getTree($pageUid, $treeLevel, '');
return $tree;
}
示例12: main
/**
* MAIN function for cache information
*
* @return string Output HTML for the module.
*/
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 = intval($langOnly);
}
$id = intval($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->JScode .= '<script type="text/javascript" src="' . $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath($this->extKey) . 'modfunc1/js/mootools.v1.11.js"></script>';
$this->pObj->doc->JScode .= '<script type="text/javascript" src="' . $GLOBALS['BACK_PATH'] . t3lib_extMgm::extRelPath($this->extKey) . 'modfunc1/js/seobasics.js"></script>';
// render depth selector
$content = t3lib_BEfunc::getFuncMenu($id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
// if there are multiple languages, show dropdown to narrow it down.
if ($this->sysHasLangs) {
$content .= 'Display only language: ';
$content .= t3lib_BEfunc::getFuncMenu($id, 'SET[lang]', $this->pObj->MOD_SETTINGS['lang'], $this->pObj->MOD_MENU['lang'], 'index.php') . '<br/>';
}
$content .= t3lib_BEfunc::getFuncCheck($id, 'SET[hideShortcuts]', $this->pObj->MOD_SETTINGS['hideShortcuts'], 'index.php', '', 'id="SET[hideShortcuts]"');
$content .= '<label for="SET[hideShortcuts]">Hide Shortcuts</label> ';
$content .= t3lib_BEfunc::getFuncCheck($id, 'SET[hideDisabled]', $this->pObj->MOD_SETTINGS['hideDisabled'], 'index.php', '', 'id="SET[hideDisabled]"');
$content .= '<label for="SET[hideDisabled]">Hide Disabled Pages</label> <br/>';
$content .= t3lib_BEfunc::getFuncCheck($id, 'SET[hideSysFolders]', $this->pObj->MOD_SETTINGS['hideSysFolders'], 'index.php', '', 'id="SET[hideSysFolders]"');
$content .= '<label for="SET[hideSysfolders]">Hide System Folders</label> <br/>';
$content .= t3lib_BEfunc::getFuncCheck($id, 'SET[hideNotInMenu]', $this->pObj->MOD_SETTINGS['hideNotInMenu'], 'index.php', '', '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 = t3lib_BEfunc::getRecord('pages', $id);
t3lib_BEfunc::workspaceOL('pages', $treeStartingRecord);
// Initialize tree object:
$tree = t3lib_div::makeInstance('t3lib_pageTree');
$tree->addField('tx_seo_titletag', 1);
$tree->addField('keywords', 1);
$tree->addField('description', 1);
if (t3lib_extMgm::isLoaded('realurl')) {
$tree->addField('tx_realurl_pathsegment', 1);
}
$tree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
// Creating top icon; the current page
$HTML = t3lib_iconWorks::getIconImage('pages', $treeStartingRecord, $GLOBALS['BACK_PATH'], 'align="top"');
$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);
if (t3lib_extMgm::isLoaded('realurl')) {
$this->loadPathCache($uidList);
}
// Render information table
$content .= $this->renderSaveButtons();
$content .= $this->renderSEOTable($tree);
$content .= $this->renderSaveButtons();
}
return $content;
}
示例13: renderTODisplay
/**
* Render display of a Template Object
*
* @param array Template Object record to render
* @param array Array of all Template Objects (passed by reference. From here records are unset)
* @param integer Scope of DS
* @param boolean If set, the function is asked to render children to template objects (and should not call it self recursively again).
* @return string HTML content
*/
function renderTODisplay($toObj, &$toRecords, $scope, $children = 0)
{
// Put together the records icon including content sensitive menu link wrapped around it:
$recordIcon = t3lib_iconWorks::getIconImage('tx_templavoila_tmplobj', $toObj, $this->doc->backPath, 'class="absmiddle"');
$recordIcon = $this->doc->wrapClickMenuOnIcon($recordIcon, 'tx_templavoila_tmplobj', $toObj['uid'], 1, '&callingScriptId=' . rawurlencode($this->doc->scriptID));
// Preview icon:
if ($toObj['previewicon']) {
$icon = '<img src="' . $this->doc->backPath . '../uploads/tx_templavoila/' . $toObj['previewicon'] . '" alt="" />';
} else {
$icon = '[No icon]';
}
// Mapping status / link:
$linkUrl = '../cm1/index.php?table=tx_templavoila_tmplobj&uid=' . $toObj['uid'] . '&_reload_from=1&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
$fileReference = t3lib_div::getFileAbsFileName($toObj['fileref']);
if (@is_file($fileReference)) {
$this->tFileList[$fileReference]++;
$fileRef = '<a href="' . htmlspecialchars($this->doc->backPath . '../' . substr($fileReference, strlen(PATH_site))) . '" target="_blank">' . htmlspecialchars($toObj['fileref']) . '</a>';
$fileMsg = '';
$fileMtime = filemtime($fileReference);
} else {
$fileRef = htmlspecialchars($toObj['fileref']);
$fileMsg = '<div class="typo3-red">ERROR: File not found</div>';
$fileMtime = 0;
}
$mappingStatus = $mappingStatus_index = '';
if ($fileMtime && $toObj['fileref_mtime']) {
if ($toObj['fileref_md5'] != '') {
$modified = @md5_file($fileReference) != $toObj['fileref_md5'];
} else {
$modified = $toObj['fileref_mtime'] != $fileMtime;
}
if ($modified) {
$mappingStatus = $mappingStatus_index = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/icon_warning2.gif', 'width="18" height="16"') . ' alt="" class="absmiddle" />';
$mappingStatus .= 'Template file was updated since last mapping (' . t3lib_BEfunc::datetime($toObj['tstamp']) . ') and you might need to remap the Template Object!';
$this->setErrorLog($scope, 'warning', $mappingStatus . ' (TO: "' . $toObj['title'] . '")');
} else {
$mappingStatus = $mappingStatus_index = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/icon_ok2.gif', 'width="18" height="16"') . ' alt="" class="absmiddle" />';
$mappingStatus .= 'Mapping Up-to-date.';
}
$mappingStatus .= '<br/><a href="' . htmlspecialchars($linkUrl) . '">[ Update mapping ]</a>';
} elseif (!$fileMtime) {
$mappingStatus = $mappingStatus_index = '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/icon_fatalerror.gif', 'width="18" height="16"') . ' alt="" class="absmiddle" />';
$mappingStatus .= 'Not mapped yet!';
$this->setErrorLog($scope, 'fatal', $mappingStatus . ' (TO: "' . $toObj['title'] . '")');
$mappingStatus .= ' - <em>(It might also mean that the TO was mapped with an older version of TemplaVoila - then just go and save the mapping again at this will be updated.)</em>';
$mappingStatus .= '<br/><a href="' . htmlspecialchars($linkUrl) . '">[ Map ]</a>';
} else {
$mappingStatus = '';
$mappingStatus .= '<a href="' . htmlspecialchars($linkUrl) . '">[ Remap ]</a>';
$mappingStatus .= '<a href="' . htmlspecialchars($linkUrl . '&_preview=1') . '">[ Preview ]</a>';
}
// Format XML if requested
if ($this->MOD_SETTINGS['set_details']) {
if ($toObj['localprocessing']) {
require_once PATH_t3lib . 'class.t3lib_syntaxhl.php';
$hlObj = t3lib_div::makeInstance('t3lib_syntaxhl');
$lpXML = '<pre>' . str_replace(chr(9), ' ', $hlObj->highLight_DS($toObj['localprocessing'])) . '</pre>';
} else {
$lpXML = '';
}
} else {
$lpXML = $toObj['localprocessing'] ? t3lib_div::formatSize(strlen($toObj['localprocessing'])) . 'bytes' : '';
}
$lpXML .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[tx_templavoila_tmplobj][' . $toObj['uid'] . ']=edit&columnsOnly=localprocessing', $this->doc->backPath)) . '"><img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/edit2.gif', 'width="11" height="12"') . ' alt="" class="absmiddle" /></a>';
// Compile info table:
$tableAttribs = ' border="0" cellpadding="1" cellspacing="1" width="98%" style="margin-top: 3px;" class="lrPadding"';
// Links:
$editLink = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick('&edit[tx_templavoila_tmplobj][' . $toObj['uid'] . ']=edit', $this->doc->backPath)) . '"><img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/edit2.gif', 'width="11" height="12"') . ' alt="" class="absmiddle" /></a>';
$toTitle = '<a href="' . htmlspecialchars($linkUrl) . '">' . htmlspecialchars($toObj['title']) . '</a>';
$fRWTOUres = array();
if (!$children) {
if ($this->MOD_SETTINGS['set_details']) {
$fRWTOUres = $this->findRecordsWhereTOUsed($toObj, $scope);
}
$content .= '
<table' . $tableAttribs . '>
<tr class="bgColor4-20">
<td colspan="3">' . $recordIcon . $toTitle . $editLink . '</td>
</tr>
<tr class="bgColor4">
<td rowspan="' . ($this->MOD_SETTINGS['set_details'] ? 7 : 4) . '" style="width: 100px; text-align: center;">' . $icon . '</td>
<td>File reference:</td>
<td>' . $fileRef . $fileMsg . '</td>
</tr>
<tr class="bgColor4">
<td>Description:</td>
<td>' . htmlspecialchars($toObj['description']) . '</td>
</tr>
<tr class="bgColor4">
<td>Mapping status:</td>
<td>' . $mappingStatus . '</td>
//.........这里部分代码省略.........
示例14: getRecordHeader
/**
* Create record header (includes teh record icon, record title etc.)
*
* @param array Record row.
* @return string HTML
*/
function getRecordHeader($row)
{
$line = t3lib_iconWorks::getIconImage('tt_content', $row, $this->backPath, ' align="top" title="' . htmlspecialchars(t3lib_BEfunc::getRecordIconAltText($row, 'tt_content')) . '"');
$line .= t3lib_BEfunc::getRecordTitle('tt_content', $row, 1);
return $this->wrapRecordTitle($line, $row);
}
示例15: render_outline_localizations
/**
* Renders localized elements of a record
*
* @param array $contentTreeArr: Part of the contentTreeArr for the element
* @param array $entries: Entries accumulated in this array (passed by reference)
* @param integer $indentLevel: Indentation level
* @return string HTML
* @access protected
* @see render_framework_singleSheet()
*/
function render_outline_localizations($contentTreeArr, &$entries, $indentLevel)
{
global $LANG, $BE_USER;
if ($contentTreeArr['el']['table'] == 'tt_content' && $contentTreeArr['el']['sys_language_uid'] <= 0) {
// Traverse the available languages of the page (not default and [All])
foreach ($this->translatedLanguagesArr as $sys_language_uid => $sLInfo) {
if ($sys_language_uid > 0 && $BE_USER->checkLanguageAccess($sys_language_uid)) {
switch ((string) $contentTreeArr['localizationInfo'][$sys_language_uid]['mode']) {
case 'exists':
// Get localized record:
$olrow = t3lib_BEfunc::getRecordWSOL('tt_content', $contentTreeArr['localizationInfo'][$sys_language_uid]['localization_uid']);
// Put together the records icon including content sensitive menu link wrapped around it:
$recordIcon_l10n = $this->getRecordStatHookValue('tt_content', $olrow['uid']) . t3lib_iconWorks::getIconImage('tt_content', $olrow, $this->doc->backPath, 'class="absmiddle" title="' . htmlspecialchars('[tt_content:' . $olrow['uid'] . ']') . '"');
if (!$this->translatorMode) {
$recordIcon_l10n = $this->doc->wrapClickMenuOnIcon($recordIcon_l10n, 'tt_content', $olrow['uid'], 1, '&callingScriptId=' . rawurlencode($this->doc->scriptID), 'new,copy,cut,pasteinto,pasteafter');
}
list($flagLink_begin, $flagLink_end) = explode('|*|', $this->link_edit('|*|', 'tt_content', $olrow['uid'], TRUE));
// Create entry for this element:
$entries[] = array('indentLevel' => $indentLevel, 'icon' => $recordIcon_l10n, 'title' => t3lib_BEfunc::getRecordTitle('tt_content', $olrow), 'table' => 'tt_content', 'uid' => $olrow['uid'], 'flag' => $flagLink_begin . ($sLInfo['flagIcon'] ? '<img src="' . $sLInfo['flagIcon'] . '" style="text-align: center; vertical-align: middle;" alt="' . htmlspecialchars($sLInfo['title']) . '" title="' . htmlspecialchars($sLInfo['title']) . '" />' : $sLInfo['title']) . $flagLink_end, 'isNewVersion' => $olrow['_ORIG_uid'] ? TRUE : FALSE);
break;
}
}
}
}
}