本文整理汇总了PHP中t3lib_iconWorks::getSpriteIcon方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_iconWorks::getSpriteIcon方法的具体用法?PHP t3lib_iconWorks::getSpriteIcon怎么用?PHP t3lib_iconWorks::getSpriteIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类t3lib_iconWorks
的用法示例。
在下文中一共展示了t3lib_iconWorks::getSpriteIcon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getFlagIconForLanguage
/**
*
* @param string $lang
* @return string
*/
public static function getFlagIconForLanguage($flagName, $options = array())
{
$flag = null;
if (!strlen($flagName)) {
$flagName = 'unknown';
}
$flag = t3lib_iconWorks::getSpriteIcon('flags-' . $flagName, $options);
return $flag;
}
示例2: render
/**
* Renders an icon link as known from the TYPO3 backend
*
* @param string $icon Icon to be used
* @param string $uri the target URI for the link
* @param string $title Title attribute of the resulting link
* @param string $onclick onclick setting
* @return string the rendered icon link
*/
public function render($icon = 'closedok', $uri = '', $title = '', $onclick = '')
{
$icon = t3lib_iconWorks::getSpriteIcon($icon, array('title' => $title));
$content = '';
if (empty($uri) && empty($onclick)) {
$content = $icon;
} else {
$content = '<a onclick="' . htmlspecialchars($onclick) . '" href="' . htmlspecialchars($uri) . '">' . $icon . '</a>';
}
return $content;
}
示例3: render
/**
* Creates the selector for workspaces
*
* @return string workspace selector as HTML select
*/
public function render()
{
$title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:toolbarItems.search', true);
$this->addJavascriptToBackend();
$searchMenu = array();
$searchMenu[] = '<a href="#" class="toolbar-item">' . t3lib_iconWorks::getSpriteIcon('apps-toolbar-menu-search', array('title' => $title)) . '</a>';
$searchMenu[] = '<div class="toolbar-item-menu" style="display: none;">';
$searchMenu[] = '<input type="text" id="search-query" name="search-query" value="" />';
$searchMenu[] = '</div>';
return implode(LF, $searchMenu);
}
示例4: main
/**
* Adding various standard options to the context menu.
* This includes both first and second level.
*
* @param object The calling object. Value by reference.
* @param array Array with the currently collected menu items to show.
* @param string Table name of clicked item.
* @param integer UID of clicked item.
* @return array Modified $menuItems array
*/
function main(&$backRef, $menuItems, $table, $uid)
{
global $BE_USER, $TCA, $LANG;
$localItems = array();
// Accumulation of local items.
// Detecting menu level
if ($BE_USER->isAdmin() && !$backRef->cmLevel && $table == 'be_users') {
// LEVEL: Primary menu.
// "SU" element added:
$url = 'mod.php?M=tools_beuser&SwitchUser=' . rawurlencode($uid) . '&switchBackUser=1';
$localItems[] = $backRef->linkItem('Switch To User', $backRef->excludeIcon(t3lib_iconWorks::getSpriteIcon('actions-system-backend-user-emulate')), $backRef->urlRefForCM($url, '', 1, 'top'), 1);
$menuItems = array_merge($menuItems, $localItems);
}
return $menuItems;
}
示例5: fwd_rwd_HTML
/**
* Creates the button with link to either forward or reverse
*
* @param string Type: "fwd" or "rwd"
* @param integer Pointer
* @param string Table name
* @return string
*/
function fwd_rwd_HTML($type,$pointer,$table='') {
$content = '';
switch($type) {
case 'fwd':
$href = $this->returnUrl . '&SET[recordsView_start]='.($pointer-$this->iLimit).'&SET[recordsView_table]='.$table;
$content = '<a href="'.htmlspecialchars($href).'">'.
t3lib_iconWorks::getSpriteIcon('actions-move-up').
'</a> <i>[1 - '.$pointer.']</i>';
break;
case 'rwd':
$href = $this->returnUrl . '&SET[recordsView_start]='.$pointer.'&SET[recordsView_table]='.$table;
$content = '<a href="'.htmlspecialchars($href).'">'.
t3lib_iconWorks::getSpriteIcon('actions-move-down').
'</a> <i>['.($pointer+1).' - '.$this->totalItems.']</i>';
break;
}
return $content;
}
示例6: render
/**
* renders the toolbar menu
*
* @return string the rendered backend menu
* @author Ingo Renner <ingo@typo3.org>
*/
public function render()
{
$actionMenu = array();
$actionEntries = $this->getActionEntries();
if ($actionEntries) {
$this->addJavascriptToBackend();
$this->addCssToBackend();
$title = $GLOBALS['LANG']->getLL('action_toolbaritem', TRUE);
$actionMenu[] = '<a href="#" class="toolbar-item">' . t3lib_iconWorks::getSpriteIcon('apps-toolbar-menu-actions', array('title' => $title)) . '</a>';
$actionMenu[] = '<ul class="toolbar-item-menu" style="display: none;">';
foreach ($actionEntries as $linkConf) {
$actionMenu[] = '<li><a href="' . htmlspecialchars($linkConf[1]) . '" target="content">' . $linkConf[2] . htmlspecialchars($linkConf[0]) . '</a></li>';
}
$actionMenu[] = '</ul>';
return implode("\n", $actionMenu);
} else {
return '';
}
}
示例7: getFlagIconForLanguage
/**
*
* @param string $lang
* @return string
*/
public static function getFlagIconForLanguage($flagName, $options = array()) {
$flag = null;
if (!strlen($flagName)) {
$flagName = 'unknown';
}
if (tx_templavoila_div::convertVersionNumberToInteger(TYPO3_version) < 4005000) {
if ($flagName == 'unknown') {
$flagName = $flagName . '.gif';
} elseif($flagName == 'multiple') {
$flagName = 'multi-language.gif';
}
$alt = isset($options['alt']) ? ' alt="' . $options['alt'] . '"' : ' alt=""';
$title = isset($options['title']) ? ' title="' . $options['title'] . '"' : '';
$flag = '<img src="' . self::getFlagIconFileForLanguage($flagName) . '"'. $title . $alt .'/>';
} else {
$flag = t3lib_iconWorks::getSpriteIcon('flags-' . $flagName, $options);
}
return $flag;
}
示例8: main
/**
* Processing of clickmenu items
*
* @param object $backRef Reference to parent
* @param array $menuItems Menu items array to modify
* @param string $table Table name
* @param integer $uid Uid of the record
* @return array Menu item array, returned after modification
* @todo Skinning for icons...
* @todo Define visibility
*/
public function main(&$backRef, $menuItems, $table, $uid)
{
$localItems = array();
// Show import/export on second level menu OR root level.
if ($backRef->cmLevel && \t3lib_div::_GP('subname') == 'moreoptions' || $table === 'pages' && $uid == 0) {
$LL = $this->includeLL();
$modUrl = $backRef->backPath . t3lib_extMgm::extRelPath('impexp') . 'app/index.php';
$url = $modUrl . '?tx_impexp[action]=export&id=' . ($table == 'pages' ? $uid : $backRef->rec['pid']);
if ($table == 'pages') {
$url .= '&tx_impexp[pagetree][id]=' . $uid;
$url .= '&tx_impexp[pagetree][levels]=0';
$url .= '&tx_impexp[pagetree][tables][]=_ALL';
} else {
$url .= '&tx_impexp[record][]=' . rawurlencode($table . ':' . $uid);
$url .= '&tx_impexp[external_ref][tables][]=_ALL';
}
$localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('export', $LL)), $backRef->excludeIcon(\t3lib_iconWorks::getSpriteIcon('actions-document-export-t3d')), $backRef->urlRefForCM($url), 1);
if ($table == 'pages') {
$url = $modUrl . '?id=' . $uid . '&table=' . $table . '&tx_impexp[action]=import';
$localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import', $LL)), $backRef->excludeIcon(\t3lib_iconWorks::getSpriteIcon('actions-document-import-t3d')), $backRef->urlRefForCM($url), 1);
}
}
return array_merge($menuItems, $localItems);
}
示例9: makeControl
/**
* Creates the control panel for a single record in the listing.
*
* @param string The table
* @param array The record for which to make the control panel.
* @return string HTML table with the control panel (unless disabled)
*/
function makeControl($table, $row)
{
global $TCA, $LANG, $BACK_PATH;
// Return blank, if disabled:
# if ($this->dontShowClipControlPanels) return '';
// Initialize:
t3lib_div::loadTCA($table);
$cells = array();
$shEl = $this->showElements;
// If the listed table is 'pages' we have to request the permission settings for each page:
if ($table == 'pages') {
$localCalcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages', $row['uid']));
}
// This expresses the edit permissions for this particular element:
$permsEdit = $table == 'pages' && $localCalcPerms & 2 || $table != 'pages' && $this->calcPerms & 16;
// "Edit" link: ( Only if permissions to edit the page-record of the content of the parent page ($this->id)
if ($permsEdit && in_array('editRec', $shEl)) {
$params = '&edit[' . $table . '][' . $row['uid'] . ']=edit';
$icon = '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/edit2' . (!$TCA[$table]['ctrl']['readOnly'] ? '' : '_d') . '.gif', 'width="11" height="12"') . ' title="' . $LANG->getLL('edit', 1) . '" alt="" />';
$cells[] = $this->wrapEditLink($icon, $params);
}
// If the extended control panel is enabled OR if we are seeing a single table:
if ($GLOBALS['SOBE']->MOD_SETTINGS['bigControlPanel'] || $this->table) {
// "Info": (All records)
if (in_array('infoRec', $shEl)) {
$cells[] = '<a href="#" onclick="' . htmlspecialchars('top.launchView(\'' . $table . '\', \'' . $row['uid'] . '\'); return false;') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/zoom2.gif', 'width="12" height="12"') . ' title="' . $LANG->getLL('showInfo', 1) . '" alt="" />' . '</a>';
}
// If the table is NOT a read-only table, then show these links:
if (!$TCA[$table]['ctrl']['readOnly']) {
// "Revert" link (history/undo)
if (in_array('revertRec', $shEl)) {
$cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $this->backPath . 'show_rechis.php?element=' . rawurlencode($table . ':' . $row['uid']) . '\',\'#latest\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/history2.gif', 'width="13" height="12"') . ' title="' . $LANG->getLL('history', 1) . '" alt="" />' . '</a>';
}
// Versioning:
if (t3lib_extMgm::isLoaded('version')) {
$vers = t3lib_BEfunc::selectVersionsOfRecord($table, $row['uid'], $fields = 'uid');
if (is_array($vers)) {
// If table can be versionized.
if (count($vers) > 1) {
$st = 'background-color: #FFFF00; font-weight: bold;';
$lab = count($vers) - 1;
} else {
$st = 'background-color: #9999cc; font-weight: bold;';
$lab = 'V';
}
$cells[] = '<a href="' . htmlspecialchars($this->backPath . t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?table=' . rawurlencode($table) . '&uid=' . rawurlencode($row['uid']) . '" class="typo3-ctrl-versioning" style="' . htmlspecialchars($st) . '">' . $lab . '</a>';
}
}
// "Edit Perms" link:
if ($table == 'pages' && in_array('permsRec', $shEl) && $GLOBALS['BE_USER']->check('modules', 'web_perm')) {
$cells[] = '<a href="' . htmlspecialchars($this->backPath . 'mod/web/perm/index.php?id=' . $row['uid'] . '&return_id=' . $row['uid'] . '&edit=1') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/perm.gif', 'width="7" height="12"') . ' title="' . $LANG->getLL('permissions', 1) . '" alt="" />' . '</a>';
}
// "Up/Down" links
if ($permsEdit && $TCA[$table]['ctrl']['sortby'] && !$this->sortField && in_array('sortRec', $shEl)) {
//
if (isset($this->currentTable['prev'][$row['uid']])) {
// Up
$params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['prev'][$row['uid']];
$cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_up.gif', 'width="11" height="10"') . ' title="' . $LANG->getLL('moveUp', 1) . '" alt="" />' . '</a>';
} else {
$cells[] = '<img src="clear.gif" ' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_up.gif', 'width="11" height="10"', 2) . ' alt="" />';
}
if ($this->currentTable['next'][$row['uid']]) {
// Down
$params = '&cmd[' . $table . '][' . $row['uid'] . '][move]=' . $this->currentTable['next'][$row['uid']];
$cells[] = '<a href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_down.gif', 'width="11" height="10"') . ' title="' . $LANG->getLL('moveDown', 1) . '" alt="" />' . '</a>';
} else {
$cells[] = '<img src="clear.gif" ' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/button_down.gif', 'width="11" height="10"', 2) . ' alt="" />';
}
}
// "Hide/Unhide" links:
$hiddenField = $TCA[$table]['ctrl']['enablecolumns']['disabled'];
if ($permsEdit && $hiddenField && $TCA[$table]['columns'][$hiddenField] && in_array('unHideRec', $shEl) && (!$TCA[$table]['columns'][$hiddenField]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $table . ':' . $hiddenField))) {
if ($row[$hiddenField]) {
$params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=0';
$cells[] = '<a title="' . $LANG->getLL('unHide' . ($table == 'pages' ? 'Page' : ''), 1) . '" href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-unhide') . '</a>';
} else {
$params = '&data[' . $table . '][' . $row['uid'] . '][' . $hiddenField . ']=1';
$cells[] = '<a title="' . $LANG->getLL('hide' . ($table == 'pages' ? 'Page' : ''), 1) . '" href="#" onclick="' . htmlspecialchars('return jumpToUrl(\'' . $GLOBALS['SOBE']->doc->issueCommand($params, -1) . '\');') . '">' . t3lib_iconWorks::getSpriteIcon('actions-edit-hide') . '</a>';
}
}
// "Delete" link:
// if ( ($table=='pages' && ($localCalcPerms&4)) || ($table!='pages' && ($this->calcPerms&16)) && in_array('delRec',$shEl) ) {
// $params='&cmd['.$table.']['.$row['uid'].'][delete]=1';
// $title = $row['title'].' ('.$row['file_name'].')';
//
// $cells[]='<a href="#" onclick="if (confirm('.$GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:mess.delete'),$title)).')) {jumpToUrl(\''.$GLOBALS['SOBE']->doc->issueCommand($params,-1).'\');} return false;"><img src="'.$this->backPath.'gfx/delete_record.gif" width="12" height="12" border="0" align="top" title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.delete',1).'" /></a>';
// }
// ToDo: weird: quickDelete = true means that there is a confirmation message
// Todo: quickDelete=true is hardcoded
$quickDelete = true;
// "Delete" with confirmation (default)
if ($quickDelete and $table == 'pages' && $localCalcPerms & 4 || $table != 'pages' && $this->calcPerms & 16 && in_array('delRec', $shEl)) {
//.........这里部分代码省略.........
示例10: getButtons
/**
* Create the panel of buttons for submitting the form or otherwise perform operations.
*
* @return array all available buttons as an assoc. array
*/
protected function getButtons()
{
global $TCA, $LANG, $BACK_PATH, $BE_USER;
$buttons = array('csh' => '', 'view' => '', 'record_list' => '', 'shortcut' => '');
// CSH
$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_func', '', $GLOBALS['BACK_PATH'], '', TRUE);
if ($this->id && is_array($this->pageinfo)) {
// View page
$buttons['view'] = '<a href="#"
onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $BACK_PATH, t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '"
title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '
">' . t3lib_iconWorks::getSpriteIcon('actions-document-view') . '</a>';
// Shortcut
if ($BE_USER->mayMakeShortcut()) {
$buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
}
// If access to Web>List for user, then link to that module.
if ($BE_USER->check('modules', 'web_list')) {
$href = $BACK_PATH . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
$buttons['record_list'] = '<a href="' . htmlspecialchars($href) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '">' . t3lib_iconWorks::getSpriteIcon('actions-system-list-open') . '</a>';
}
}
return $buttons;
}
示例11: getButtons
/**
* Create the panel of buttons for submitting the form or otherwise perform operations.
*
* @return array all available buttons as an assoc. array
*/
protected function getButtons()
{
global $LANG, $BACK_PATH;
$buttons = array('csh' => '', 'back' => '');
if ($this->page_id) {
if ((string) $this->table == 'pages') {
// CSH
$buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'], '', TRUE);
} elseif ((string) $this->table == 'tt_content') {
// CSH
$buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_cs', $GLOBALS['BACK_PATH'], '', TRUE);
}
if ($this->R_URI) {
// Back
$buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack" title="' . $LANG->getLL('goBack', TRUE) . '">' . t3lib_iconWorks::getSpriteIcon('actions-view-go-back') . '</a>';
}
}
return $buttons;
}
示例12: notEdit
/**
* Showing the permissions in a tree ($this->edit = false)
* (Adding content to internal content variable)
*
* @return void
*/
public function notEdit()
{
global $BE_USER, $LANG, $BACK_PATH;
// Get usernames and groupnames: The arrays we get in return contains only 1) users which are members of the groups of the current user, 2) groups that the current user is member of
$beGroupKeys = $BE_USER->userGroupsUID;
$beUserArray = t3lib_BEfunc::getUserNames();
if (!$GLOBALS['BE_USER']->isAdmin()) {
$beUserArray = t3lib_BEfunc::blindUserNames($beUserArray, $beGroupKeys, 0);
}
$beGroupArray = t3lib_BEfunc::getGroupNames();
if (!$GLOBALS['BE_USER']->isAdmin()) {
$beGroupArray = t3lib_BEfunc::blindGroupNames($beGroupArray, $beGroupKeys, 0);
}
// Length of strings:
$tLen = $this->MOD_SETTINGS['mode'] == 'perms' ? 20 : 30;
// Selector for depth:
$code .= $LANG->getLL('Depth') . ': ';
$code .= t3lib_BEfunc::getFuncMenu($this->id, 'SET[depth]', $this->MOD_SETTINGS['depth'], $this->MOD_MENU['depth']);
$this->content .= $this->doc->section('', $code);
$this->content .= $this->doc->spacer(5);
// Initialize tree object:
$tree = t3lib_div::makeInstance('t3lib_pageTree');
$tree->init('AND ' . $this->perms_clause);
$tree->addField('perms_user', 1);
$tree->addField('perms_group', 1);
$tree->addField('perms_everybody', 1);
$tree->addField('perms_userid', 1);
$tree->addField('perms_groupid', 1);
$tree->addField('hidden');
$tree->addField('fe_group');
$tree->addField('starttime');
$tree->addField('endtime');
$tree->addField('editlock');
// Creating top icon; the current page
$HTML = t3lib_iconWorks::getSpriteIconForRecord('pages', $this->pageinfo);
$tree->tree[] = array('row' => $this->pageinfo, 'HTML' => $HTML);
// Create the tree from $this->id:
$tree->getTree($this->id, $this->MOD_SETTINGS['depth'], '');
// Make header of table:
$code = '';
if ($this->MOD_SETTINGS['mode'] == 'perms') {
$code .= '
<tr class="t3-row-header">
<td colspan="2"> </td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td>' . $LANG->getLL('Owner', TRUE) . '</td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center">' . $LANG->getLL('Group', TRUE) . '</td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center">' . $LANG->getLL('Everybody', TRUE) . '</td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center">' . $LANG->getLL('EditLock', TRUE) . '</td>
</tr>
';
} else {
$code .= '
<tr class="t3-row-header">
<td colspan="2"> </td>
<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center" nowrap="nowrap">' . $LANG->getLL('User', TRUE) . ': ' . htmlspecialchars($BE_USER->user['username']) . '</td>
' . (!$BE_USER->isAdmin() ? '<td><img' . t3lib_iconWorks::skinImg($BACK_PATH, 'gfx/line.gif', 'width="5" height="16"') . ' alt="" /></td>
<td align="center">' . $LANG->getLL('EditLock', TRUE) . '</td>' : '') . '
</tr>';
}
// Traverse tree:
foreach ($tree->tree as $data) {
$cells = array();
$pageId = $data['row']['uid'];
// Background colors:
$bgCol = $this->lastEdited == $pageId ? ' class="bgColor-20"' : '';
$lE_bgCol = $bgCol;
// User/Group names:
$userName = $beUserArray[$data['row']['perms_userid']] ? $beUserArray[$data['row']['perms_userid']]['username'] : ($data['row']['perms_userid'] ? $data['row']['perms_userid'] : '');
if ($data['row']['perms_userid'] && !$beUserArray[$data['row']['perms_userid']]) {
$userName = SC_mod_web_perm_ajax::renderOwnername($pageId, $data['row']['perms_userid'], htmlspecialchars(t3lib_div::fixed_lgd_cs($userName, 20)), false);
} else {
$userName = SC_mod_web_perm_ajax::renderOwnername($pageId, $data['row']['perms_userid'], htmlspecialchars(t3lib_div::fixed_lgd_cs($userName, 20)));
}
$groupName = $beGroupArray[$data['row']['perms_groupid']] ? $beGroupArray[$data['row']['perms_groupid']]['title'] : ($data['row']['perms_groupid'] ? $data['row']['perms_groupid'] : '');
if ($data['row']['perms_groupid'] && !$beGroupArray[$data['row']['perms_groupid']]) {
$groupName = SC_mod_web_perm_ajax::renderGroupname($pageId, $data['row']['perms_groupid'], htmlspecialchars(t3lib_div::fixed_lgd_cs($groupName, 20)), false);
} else {
$groupName = SC_mod_web_perm_ajax::renderGroupname($pageId, $data['row']['perms_groupid'], htmlspecialchars(t3lib_div::fixed_lgd_cs($groupName, 20)));
}
// Seeing if editing of permissions are allowed for that page:
$editPermsAllowed = $data['row']['perms_userid'] == $BE_USER->user['uid'] || $BE_USER->isAdmin();
// First column:
$cellAttrib = $data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '';
$cells[] = '
<td align="left" nowrap="nowrap"' . ($cellAttrib ? $cellAttrib : $bgCol) . '>' . $data['HTML'] . htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['title'], $tLen)) . ' </td>';
// "Edit permissions" -icon
if ($editPermsAllowed && $pageId) {
$aHref = 'index.php?mode=' . $this->MOD_SETTINGS['mode'] . '&depth=' . $this->MOD_SETTINGS['depth'] . '&id=' . ($data['row']['_ORIG_uid'] ? $data['row']['_ORIG_uid'] : $pageId) . '&return_id=' . $this->id . '&edit=1';
$cells[] = '
//.........这里部分代码省略.........
示例13: renderMenuEntry
/**
* returns the recent documents list as an array
*
* @return array all recent documents as list-items
*/
public function renderMenuEntry($document, $md5sum, $isRecentDoc = false, $isFirstDoc = false)
{
$table = $document[3]['table'];
$uid = $document[3]['uid'];
$record = t3lib_BEfunc::getRecordWSOL($table, $uid);
if (!is_array($record)) {
// record seems to be deleted
return '';
}
$label = htmlspecialchars(strip_tags(t3lib_div::htmlspecialchars_decode($document[0])));
$icon = t3lib_iconWorks::getSpriteIconForRecord($table, $record);
$link = $GLOBALS['BACK_PATH'] . 'alt_doc.php?' . $document[2];
$firstRow = '';
if ($isFirstDoc) {
$firstRow = ' first-row';
}
if (!$isRecentDoc) {
$title = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:rm.closeDoc', true);
// open document
$closeIcon = t3lib_iconWorks::getSpriteIcon('actions-document-close');
$entry = '
<tr class="opendoc' . $firstRow . '">
<td class="icon">' . $icon . '</td>
<td class="label"><a href="#" onclick="jump(unescape(\'' . htmlspecialchars($link) . '\'), \'web_list\', \'web\'); TYPO3BackendOpenDocs.toggleMenu(); return false;" target="content">' . $label . '</a></td>
<td class="close" onclick="return TYPO3BackendOpenDocs.closeDocument(\'' . $md5sum . '\');">' . $closeIcon . '</td>
</tr>';
} else {
// recently used document
$entry = '
<tr class="recentdoc' . $firstRow . '">
<td class="icon">' . $icon . '</td>
<td class="label" colspan="2"><a href="#" onclick="jump(unescape(\'' . htmlspecialchars($link) . '\'), \'web_list\', \'web\'); TYPO3BackendOpenDocs.toggleMenu(); return false;" target="content">' . $label . '</a></td>
</tr>';
}
return $entry;
}
示例14: link_bottomControls
/**
* Render the bottom controls which (might) contain the new, browse and paste-buttons
* which sit below each content element
*
* @param array $elementPointer
* @param boolean $canCreateNew
* @return string
*/
protected function link_bottomControls($elementPointer, $canCreateNew)
{
$output = '<span class="tpm-bottom-controls">';
// "New" icon:
if ($canCreateNew && !in_array('new', $this->blindIcons)) {
$iconOptions = array('title' => $GLOBALS['LANG']->getLL('createnewrecord'));
$newIcon = t3lib_iconWorks::getSpriteIcon('actions-document-new', $iconOptions);
$output .= $this->link_new($newIcon, $elementPointer);
}
// "Browse Record" icon
if ($canCreateNew && !in_array('browse', $this->blindIcons)) {
$iconOptions = array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.browse_db'), 'class' => 'browse');
$newIcon = t3lib_iconWorks::getSpriteIcon('actions-insert-record', $iconOptions);
$output .= $this->link_browse($newIcon, $elementPointer);
}
// "Paste" icon
if ($canCreateNew) {
$output .= '<span class="sortablePaste">' . $this->clipboardObj->element_getPasteButtons($elementPointer) . ' </span>';
}
$output .= '</span>';
return $output;
}
示例15: Typo3Icon
function Typo3Icon($class, $label = '')
{
if ($this->iconWorks) {
return t3lib_iconWorks::getSpriteIcon($class);
} else {
return $label ? '[' . $label . ']' : '';
}
}