本文整理汇总了PHP中TYPO3\CMS\Backend\Utility\IconUtility::skinImg方法的典型用法代码示例。如果您正苦于以下问题:PHP IconUtility::skinImg方法的具体用法?PHP IconUtility::skinImg怎么用?PHP IconUtility::skinImg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Utility\IconUtility
的用法示例。
在下文中一共展示了IconUtility::skinImg方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: manipulateCacheActions
/**
* Add an entry to the CacheMenuItems array
*
* @param array $cacheActions Array of CacheMenuItems
* @param array $optionValues Array of AccessConfigurations-identifiers (typically used by userTS with options.clearCache.identifier)
*/
public function manipulateCacheActions(&$cacheActions, &$optionValues)
{
$title = LocalizationUtility::translate('cache_action.title', 'cs_clear_images');
$icon = '<img ' . IconUtility::skinImg($GLOBALS['BACK_PATH'], ExtensionManagementUtility::extRelPath('cs_clear_images') . 'Resources/Public/Images/clear_cache_icon.png', 'width="16" height="16"') . ' alt="" title="' . $title . '"/>';
// Clearing of processed images
$cacheActions[] = array('id' => 'tx_csclearimages', 'title' => $title, 'href' => $this->backPath . 'tce_db.php?vC=' . $GLOBALS['BE_USER']->veriCode() . '&cacheCmd=tx_csclearimages&ajaxCall=1' . \TYPO3\CMS\Backend\Utility\BackendUtility::getUrlToken('tceAction'), 'icon' => $icon);
}
示例2: init
public function init($PA, $fobj)
{
$GLOBALS['LANG']->includeLLFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('cal') . 'Resources/Private/Language/locallang_db.xml');
$this->frequency = $PA['row']['freq'];
if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 7005000) {
$this->frequency = $PA['row']['freq'][0];
}
$this->uid = $PA['row']['uid'];
$this->row = $PA['row'];
$this->table = $PA['table'];
$this->rdateType = $this->row['rdate_type'];
$this->rdate = $this->row['rdate'];
$this->rdateValues = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->row['rdate'], 1);
if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 7004000) {
$this->garbageIcon = '<span class="t3-icon fa t3-icon fa fa-trash"> </span>';
$this->newIcon = '<span title="' . $GLOBALS['LANG']->getLL('tx_cal_event.add_recurrence') . '" class="t3-icon fa t3-icon fa fa-plus-square"> </span>';
} else {
$this->garbageIcon = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/garbage.gif') . ' title="' . $GLOBALS['LANG']->getLL('tx_cal_event.remove_recurrence') . '" alt="' . $GLOBALS['LANG']->getLL('tx_cal_event.delete_recurrence') . '" />';
$this->newIcon = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/new_el.gif') . ' title="' . $GLOBALS['LANG']->getLL('tx_cal_event.add_recurrence') . '" alt="' . $GLOBALS['LANG']->getLL('tx_cal_event.add_recurrence') . '" />';
}
$this->commonJS = '';
if (\TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 7004000) {
$this->commonJS .= '<script src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('cal') . 'Resources/Public/js/recurui2.js" type="text/javascript"></script>' . chr(10) . '<script src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('cal') . 'Resources/Public/js/url2.js" type="text/javascript"></script>';
} else {
$this->commonJS .= '<script src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('cal') . 'Resources/Public/js/recurui.js" type="text/javascript"></script>' . chr(10) . '<script src="' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('cal') . 'Resources/Public/js/url.js" type="text/javascript"></script>';
}
$this->everyMonthText = $GLOBALS['LANG']->getLL('tx_cal_event.recurs_every_month');
$this->selectedMonthText = $GLOBALS['LANG']->getLL('tx_cal_event.recurs_selected_months');
$this->counts = $this->getCountsArray();
$startDay = $this->getWeekStartDay($PA);
$this->weekdays = $this->getWeekDaysArray($startDay);
$this->months = $this->getMonthsArray();
}
示例3: render
/**
* Render javascript in header
*
* @return string the rendered page info icon
* @see template::getPageInfo() Note: can't call this method as it's protected!
*/
public function render()
{
$doc = $this->getDocInstance();
$id = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
$pageRecord = BackendUtility::readPageAccess($id, $GLOBALS['BE_USER']->getPagePermsClause(1));
// Add icon with clickmenu, etc:
if ($pageRecord['uid']) {
// If there IS a real page
$alttext = BackendUtility::getRecordIconAltText($pageRecord, 'pages');
$iconImg = IconUtility::getSpriteIconForRecord('pages', $pageRecord, array('title' => htmlspecialchars($alttext)));
// Make Icon:
$theIcon = $doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
} else {
// On root-level of page tree
// Make Icon
$iconImg = '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/i/_icon_website.gif') . ' alt="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '" />';
if ($GLOBALS['BE_USER']->user['admin']) {
$theIcon = $doc->wrapClickMenuOnIcon($iconImg, 'pages', 0);
} else {
$theIcon = $iconImg;
}
}
// Setting icon with clickmenu + uid
$pageInfo = $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>';
return $pageInfo;
}
示例4: printTree
/**
* Create the page navigation tree in HTML
*
* @param array $treeArr Tree array
* @return string HTML output.
* @todo Define visibility
*/
public function printTree($treeArr = '')
{
$titleLen = intval($GLOBALS['BE_USER']->uc['titleLen']);
if (!is_array($treeArr)) {
$treeArr = $this->tree;
}
$out = '';
$c = 0;
foreach ($treeArr as $k => $v) {
$c++;
$bgColorClass = ($c + 1) % 2 ? 'bgColor' : 'bgColor-10';
if ($GLOBALS['SOBE']->browser->curUrlInfo['act'] == 'page' && $GLOBALS['SOBE']->browser->curUrlInfo['pageid'] == $v['row']['uid'] && $GLOBALS['SOBE']->browser->curUrlInfo['pageid']) {
$arrCol = '<td><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_right.gif', 'width="5" height="9"') . ' class="c-blinkArrowR" alt="" /></td>';
$bgColorClass = 'bgColor4';
} else {
$arrCol = '<td></td>';
}
$aOnClick = 'return jumpToUrl(\'' . $this->thisScript . '?act=' . $GLOBALS['SOBE']->browser->act . '&mode=' . $GLOBALS['SOBE']->browser->mode . '&expandPage=' . $v['row']['uid'] . '\');';
$cEbullet = $this->ext_isLinkable($v['row']['doktype'], $v['row']['uid']) ? '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/ol/arrowbullet.gif', 'width="18" height="16"') . ' alt="" /></a>' : '';
$out .= '
<tr class="' . $bgColorClass . '">
<td nowrap="nowrap"' . ($v['row']['_CSSCLASS'] ? ' class="' . $v['row']['_CSSCLASS'] . '"' : '') . '>' . $v['HTML'] . $this->wrapTitle($this->getTitleStr($v['row'], $titleLen), $v['row'], $this->ext_pArrPages) . '</td>' . $arrCol . '<td>' . $cEbullet . '</td>
</tr>';
}
$out = '
<!--
Navigation Page Tree:
-->
<table border="0" cellpadding="0" cellspacing="0" id="typo3-tree">
' . $out . '
</table>';
return $out;
}
示例5: wrapRecordHeader
/**
* Wrapping the record header (from getRecordHeader())
*
* @param string $str HTML content
* @param array $row Record array.
* @return string HTML content
*/
public function wrapRecordHeader($str, $row)
{
if ($row['uid'] == $this->moveUid) {
return '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/content_client.gif', 'width="7" height="10"') . ' alt="" />' . $str;
} else {
return $str;
}
}
示例6: getVersionSelector
/**
* Creates the version selector for the page id inputted.
* Moved out of the core file \TYPO3\CMS\Backend\Template\DocumentTemplate
*
* @param int $id Page id to create selector for.
* @param bool $noAction If set, there will be no button for swapping page.
* @return void
* @see \TYPO3\CMS\Backend\Template\DocumentTemplate
*/
public function getVersionSelector($id, $noAction = FALSE)
{
if ($id <= 0) {
return;
}
if ($GLOBALS['BE_USER']->workspace == 0) {
// Get Current page record:
$curPage = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('pages', $id);
// If the selected page is not online, find the right ID
$onlineId = $curPage['pid'] == -1 ? $curPage['t3ver_oid'] : $id;
// Select all versions of online version:
$versions = \TYPO3\CMS\Backend\Utility\BackendUtility::selectVersionsOfRecord('pages', $onlineId, 'uid,pid,t3ver_label,t3ver_oid,t3ver_wsid,t3ver_id');
// If more than one was found...:
if (count($versions) > 1) {
$selectorLabel = '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xlf:versionSelect.label', TRUE) . '</strong>';
// Create selector box entries:
$opt = array();
foreach ($versions as $vRow) {
if ($vRow['uid'] == $onlineId) {
// Live version
$label = '[' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xlf:versionSelect.live', TRUE) . ']';
} else {
$label = $vRow['t3ver_label'] . ' (' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xlf:versionId', TRUE) . ' ' . $vRow['t3ver_id'] . ($vRow['t3ver_wsid'] != 0 ? ' ' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xlf:workspaceId', TRUE) . ' ' . $vRow['t3ver_wsid'] : '') . ')';
}
$opt[] = '<option value="' . htmlspecialchars(GeneralUtility::linkThisScript(array('id' => $vRow['uid']))) . '"' . ($id == $vRow['uid'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
}
// Add management link:
$management = '<input type="button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:ver.mgm', TRUE) . '" onclick="window.location.href=\'' . htmlspecialchars($GLOBALS['BACK_PATH'] . \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('web_txversionM1', array('table' => 'pages', 'uid' => $onlineId))) . '\';" />';
// Create onchange handler:
$onChange = 'window.location.href=this.options[this.selectedIndex].value;';
// Controls:
if ($id == $onlineId) {
$controls = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_left.gif', 'width="5" height="9"') . ' class="absmiddle" alt="" /> <strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:ver.online', TRUE) . '</strong>';
} elseif (!$noAction) {
$href = $GLOBALS['TBE_TEMPLATE']->issueCommand('&cmd[pages][' . $onlineId . '][version][swapWith]=' . $id . '&cmd[pages][' . $onlineId . '][version][action]=swap', GeneralUtility::linkThisScript(array('id' => $onlineId)));
$controls = '<a href="' . htmlspecialchars($href) . '" class="text-nowrap">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-version-swap-version', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:ver.swapPage', TRUE), 'style' => 'margin-left:5px;vertical-align:bottom;')) . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:ver.swap', TRUE) . '</strong></a>';
}
// Write out HTML code:
return '
<!--
Version selector:
-->
<table border="0" cellpadding="0" cellspacing="0" id="typo3-versionSelector">
<tr>
<td>' . $selectorLabel . '</td>
<td>
<select onchange="' . htmlspecialchars($onChange) . '">
' . implode('', $opt) . '
</select></td>
<td>' . $controls . '</td>
<td>' . $management . '</td>
</tr>
</table>
';
}
}
}
示例7: render
/**
* Renders the icon
*
* @param string $icon Icon to be used
* @param string $title Optional title
* @return string Content rendered image
*/
public function render($icon, $title = '')
{
if (!empty($icon)) {
$absIconPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFilename($icon);
if (file_exists($absIconPath)) {
$icon = $GLOBALS['BACK_PATH'] . '../' . str_replace(PATH_site, '', $absIconPath);
}
} else {
$icon = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('reports') . 'ext_icon.png';
}
$content = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], $icon, 'width="16" height="16"') . ' title="' . htmlspecialchars($title) . '" alt="' . htmlspecialchars($title) . '" />';
return $content;
}
示例8: renderStatic
/**
* @param array $arguments
* @param callable $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
*
* @return string
*/
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
{
$icon = $arguments['icon'];
$title = $arguments['title'];
if (!empty($icon)) {
$absIconPath = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFilename($icon);
if (file_exists($absIconPath)) {
$icon = $GLOBALS['BACK_PATH'] . '../' . str_replace(PATH_site, '', $absIconPath);
}
} else {
$icon = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('reports') . 'ext_icon.png';
}
return '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], $icon, 'width="16" height="16"') . ' title="' . htmlspecialchars($title) . '" alt="' . htmlspecialchars($title) . '" />';
}
示例9: render
/**
* renders the actual logo code
*
* @return string Logo html code snippet to use in the backend
*/
public function render()
{
// Default
$logoFile = 'gfx/alt_backend_logo.gif';
if (is_string($this->logo)) {
// Overwrite
$logoFile = $this->logo;
}
$imgInfo = getimagesize(PATH_site . TYPO3_mainDir . $logoFile);
$logo = '<a href="' . TYPO3_URL_GENERAL . '" target="_blank">' . '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg('', $logoFile, $imgInfo[3]) . ' title="TYPO3 Content Management System" alt="" />' . '</a>';
// Overwrite with custom logo
if ($GLOBALS['TBE_STYLES']['logo']) {
$imgInfo = @getimagesize(\TYPO3\CMS\Core\Utility\GeneralUtility::resolveBackPath(PATH_typo3 . $GLOBALS['TBE_STYLES']['logo'], 3));
$logo = '<a href="' . TYPO3_URL_GENERAL . '" target="_blank">' . '<img src="' . $GLOBALS['TBE_STYLES']['logo'] . '" ' . $imgInfo[3] . ' title="TYPO3 Content Management System" alt="" />' . '</a>';
}
return $logo;
}
示例10: printTree
/**
* Create the page navigation tree in HTML
*
* @param array Tree array
* @return string HTML output.
*/
public function printTree($treeArr = '')
{
$titleLen = (int) $GLOBALS['BE_USER']->uc['titleLen'];
if (!is_array($treeArr)) {
$treeArr = $this->tree;
}
$out = '';
$closeDepth = array();
foreach ($treeArr as $treeItem) {
$classAttr = $treeItem['row']['_CSSCLASS'];
if ($treeItem['isFirst']) {
$out .= '<ul class="list-tree">';
}
// Add CSS classes to the list item
if ($treeItem['hasSub']) {
$classAttr .= ' list-tree-control-open';
}
$selected = '';
if ($GLOBALS['SOBE']->browser->curUrlInfo['act'] == 'page' && $GLOBALS['SOBE']->browser->curUrlInfo['pageid'] == $treeItem['row']['uid'] && $GLOBALS['SOBE']->browser->curUrlInfo['pageid']) {
$selected = ' bg-success';
}
$aOnClick = 'return jumpToUrl(' . GeneralUtility::quoteJSvalue($this->getThisScript() . 'act=' . $GLOBALS['SOBE']->browser->act . '&editorNo=' . $GLOBALS['SOBE']->browser->editorNo . '&contentTypo3Language=' . $GLOBALS['SOBE']->browser->contentTypo3Language . '&mode=' . $GLOBALS['SOBE']->browser->mode . '&expandPage=' . $treeItem['row']['uid']) . ');';
$cEbullet = $this->ext_isLinkable($treeItem['row']['doktype'], $treeItem['row']['uid']) ? '<a href="#" class="pull-right" onclick="' . htmlspecialchars($aOnClick) . '"><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/ol/arrowbullet.gif', 'width="18" height="16"') . ' alt="" /></a>' : '';
$out .= '<li' . ($classAttr ? ' class="' . trim($classAttr) . '"' : '') . '><span class="list-tree-group' . $selected . '">' . $cEbullet . $treeItem['HTML'] . $this->wrapTitle($this->getTitleStr($treeItem['row'], $titleLen), $treeItem['row'], $this->ext_pArrPages) . '</span>';
if (!$treeItem['hasSub']) {
$out .= '</li>';
}
// We have to remember if this is the last one
// on level X so the last child on level X+1 closes the <ul>-tag
if ($treeItem['isLast']) {
$closeDepth[$treeItem['invertedDepth']] = 1;
}
// If this is the last one and does not have subitems, we need to close
// the tree as long as the upper levels have last items too
if ($treeItem['isLast'] && !$treeItem['hasSub']) {
for ($i = $treeItem['invertedDepth']; $closeDepth[$i] == 1; $i++) {
$closeDepth[$i] = 0;
$out .= '</ul></li>';
}
}
}
$out = '<ul class="list-tree" id="treeRoot">' . $out . '</ul>';
return $out;
}
示例11: main
/**
* The main function. Executes all updates.
* @return string The update process output.
*/
function main()
{
if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('do_update') == 'htaccess') {
$this->removeHtaccessFromUploadFolder();
}
$content = '';
foreach ($this->action as $action) {
if ($action == 'rename_tables') {
$content .= $this->renameTables();
}
}
if ($this->hasHtaccessFile()) {
$content .= '<a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('do_update' => 'htaccess')) . '">Remove .htaccess file in upload dir<img style="vertical-align:bottom;" ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/refresh_n.gif', 'width="18" height="16"') . '></a><br>';
}
if ($content == '') {
$content = 'Nothing to update!';
}
return $content;
}
示例12: linkWrapItems
/**
* Returns the title 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 Table name
* @param integer $uid UID
* @param string $title Title string
* @param array $row Records array (from table name)
* @return string
*/
public function linkWrapItems($table, $uid, $title, $row)
{
// if we handle translation records, make sure that we refer to the localisation parent with their uid
if (is_array($GLOBALS['TCA'][$table]['ctrl']) && array_key_exists('transOrigPointerField', $GLOBALS['TCA'][$table]['ctrl'])) {
$transOrigPointerField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
if (\TYPO3\CMS\Core\Utility\MathUtility::convertToPositiveInteger($row[$transOrigPointerField]) > 0) {
$uid = $row[$transOrigPointerField];
}
}
$currentImage = '';
if ($this->browselistObj->curUrlInfo['recordTable'] === $table && $this->browselistObj->curUrlInfo['recordUid'] === $uid) {
$currentImage = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_right.gif', 'width="5" height="9"') . ' class="c-blinkArrowL" alt="" />';
}
$title = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle($table, $row, FALSE, TRUE);
if (@$this->browselistObj->mode === 'rte') {
//used in RTE mode:
$aOnClick = 'return link_spec(\'' . $this->linkHandler . ':' . $table . ':' . $uid . '\');';
} else {
//used in wizard mode
$aOnClick = 'return link_folder(\'' . $this->linkHandler . ':' . $table . ':' . $uid . '\');';
}
return '<a href="#" onclick="' . $aOnClick . '">' . $title . $currentImage . '</a>';
}
示例13: getIcon
/**
* Get icon for the row.
* If $this->iconPath and $this->iconName is set, try to get icon based on those values.
*
* @param array $row Item row.
* @return string Image tag.
*/
public function getIcon($row)
{
if ($this->iconPath && $this->iconName) {
$icon = '<img' . IconUtility::skinImg('', $this->iconPath . $this->iconName, 'width="18" height="16"') . ' alt=""' . ($this->showDefaultTitleAttribute ? ' title="UID: ' . $row['uid'] . '"' : '') . ' />';
} else {
$icon = IconUtility::getSpriteIconForRecord($this->table, $row, array('title' => $this->showDefaultTitleAttribute ? 'UID: ' . $row['uid'] : $this->getTitleAttrib($row), 'class' => 'c-recIcon'));
}
return $this->wrapIcon($icon, $row);
}
示例14: getRootIcon
/**
* Get the icon for the root
* $this->iconPath and $this->rootIconName have to be set.
*
* @param array $row Data
*
* @return string Image tag
*/
public function getRootIcon(array $row)
{
if (!is_array($row)) {
if (TYPO3_DLOG) {
GeneralUtility::devLog('getRootIcon (CommerceTeam\\Commerce\\Tree\\Leaf\\View) gets passed invalid parameters.', COMMERCE_EXTKEY, 3);
}
return '';
}
$icon = '<img' . IconUtility::skinImg($this->iconPath, $this->rootIconName, 'width="18" height="16"') . ' title="Root" alt="" />';
return $this->wrapIcon($icon, $row);
}
示例15: getBulkSelector
/**
* Get the HTML data required for a bulk selection of files of the TYPO3 Element Browser.
*
* @param integer $filesCount Number of files currently displayed
* @return string HTML data required for a bulk selection of files - if $filesCount is 0, nothing is returned
* @todo Define visibility
*/
public function getBulkSelector($filesCount)
{
if (!$filesCount) {
return '';
}
$labelToggleSelection = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_browse_links.xlf:toggleSelection', TRUE);
$labelImportSelection = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_browse_links.xlf:importSelection', TRUE);
// Getting flag for showing/not showing thumbnails:
$noThumbsInEB = $GLOBALS['BE_USER']->getTSConfigVal('options.noThumbsInEB');
$out = $this->doc->spacer(10) . '<div>' . '<a href="#" onclick="BrowseLinks.Selector.handle()">' . '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/import.gif', 'width="12" height="12"') . ' title="' . $labelImportSelection . '" alt="" /> ' . $labelImportSelection . '</a> ' . '<a href="#" onclick="BrowseLinks.Selector.toggle()">' . '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/clip_select.gif', 'width="12" height="12"') . ' title="' . $labelToggleSelection . '" alt="" /> ' . $labelToggleSelection . '</a>' . '</div>';
$thumbNailCheck = '';
if (!$noThumbsInEB && $this->selectedFolder) {
// MENU-ITEMS, fetching the setting for thumbnails from File>List module:
$_MOD_MENU = array('displayThumbs' => '');
$_MCONF['name'] = 'file_list';
$_MOD_SETTINGS = BackendUtility::getModuleData($_MOD_MENU, GeneralUtility::_GP('SET'), $_MCONF['name']);
$addParams = '&act=' . $this->act . '&mode=' . $this->mode . '&expandFolder=' . rawurlencode($this->selectedFolder->getCombinedIdentifier()) . '&bparams=' . rawurlencode($this->bparams);
$thumbNailCheck = BackendUtility::getFuncCheck('', 'SET[displayThumbs]', $_MOD_SETTINGS['displayThumbs'], GeneralUtility::_GP('M') ? '' : $this->thisScript, $addParams, 'id="checkDisplayThumbs"') . ' <label for="checkDisplayThumbs">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:displayThumbs', TRUE) . '</label>';
$out .= $this->doc->spacer(5) . $thumbNailCheck . $this->doc->spacer(15);
} else {
$out .= $this->doc->spacer(15);
}
return $out;
}