本文整理汇总了PHP中TYPO3\CMS\Backend\Utility\BackendUtility::wrapClickMenuOnIcon方法的典型用法代码示例。如果您正苦于以下问题:PHP BackendUtility::wrapClickMenuOnIcon方法的具体用法?PHP BackendUtility::wrapClickMenuOnIcon怎么用?PHP BackendUtility::wrapClickMenuOnIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Utility\BackendUtility
的用法示例。
在下文中一共展示了BackendUtility::wrapClickMenuOnIcon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderStatic
/**
* @param array $arguments
* @param callable $renderChildrenClosure
* @param RenderingContextInterface $renderingContext
*
* @return string
*/
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
{
$id = GeneralUtility::_GP('id');
$pageRecord = BackendUtility::readPageAccess($id, $GLOBALS['BE_USER']->getPagePermsClause(1));
// Add icon with clickmenu, etc:
/** @var IconFactory $iconFactory */
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
if ($pageRecord['uid']) {
// If there IS a real page
$altText = BackendUtility::getRecordIconAltText($pageRecord, 'pages');
$theIcon = '<span title="' . $altText . '">' . $iconFactory->getIconForRecord('pages', $pageRecord, Icon::SIZE_SMALL)->render() . '</span>';
// Make Icon:
$theIcon = BackendUtility::wrapClickMenuOnIcon($theIcon, 'pages', $pageRecord['uid']);
// Setting icon with clickmenu + uid
$theIcon .= ' <em>[PID: ' . $pageRecord['uid'] . ']</em>';
} else {
// On root-level of page tree
// Make Icon
$theIcon = '<span title="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '">' . $iconFactory->getIcon('apps-pagetree-page-domain', Icon::SIZE_SMALL)->render() . '</span>';
if ($GLOBALS['BE_USER']->user['admin']) {
$theIcon = BackendUtility::wrapClickMenuOnIcon($theIcon, 'pages', 0);
}
}
return $theIcon;
}
示例2: render
/**
* Iterates through elements of $each and renders child nodes
*
* @param array $record The tt_content record
* @param boolean $oncludeTitle If title should be included in output,
* @return string
*/
public function render($record)
{
$shortcutContent = '';
$tableName = 'tt_content';
if (is_array($record)) {
$altText = BackendUtility::getRecordIconAltText($record, $tableName);
$iconImg = IconUtility::getSpriteIconForRecord($tableName, $record, array('title' => $altText));
if ($this->getBackendUser()->recordEditAccessInternals($tableName, $record)) {
$iconImg = BackendUtility::wrapClickMenuOnIcon($iconImg, $tableName, $record['uid'], 1, '', '+copy,info,edit,view');
}
$link = $this->linkEditContent(htmlspecialchars(BackendUtility::getRecordTitle($tableName, $record)), $record);
$shortcutContent = $iconImg . $link;
}
return $shortcutContent;
}
示例3: render
/**
* Entry method
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
$languageService = $this->getLanguageService();
$backendUser = $this->getBackendUserAuthentication();
$table = $this->data['tableName'];
$row = $this->data['databaseRow'];
$options = $this->data;
if (empty($this->data['fieldListToRender'])) {
$options['renderType'] = 'fullRecordContainer';
} else {
$options['renderType'] = 'listOfFieldsContainer';
}
$result = $this->nodeFactory->create($options)->render();
$childHtml = $result['html'];
$recordPath = '';
// @todo: what is this >= 0 check for? wsol cases?!
if ($this->data['effectivePid'] >= 0) {
$permissionsClause = $backendUser->getPagePermsClause(1);
$recordPath = BackendUtility::getRecordPath($this->data['effectivePid'], $permissionsClause, 15);
}
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$icon = '<span title="' . htmlspecialchars($recordPath) . '">' . $iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render() . '</span>';
// @todo: Could this be done in a more clever way? Does it work at all?
$tableTitle = $languageService->sL($this->data['processedTca']['ctrl']['title']);
if ($this->data['command'] === 'new') {
$newOrUid = ' <span class="typo3-TCEforms-newToken">' . $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.new', true) . '</span>';
// @todo: There is quite some stuff do to for WS overlays ...
$workspacedPageRecord = BackendUtility::getRecordWSOL('pages', $this->data['effectivePid'], 'title');
$pageTitle = BackendUtility::getRecordTitle('pages', $workspacedPageRecord, true, false);
if ($table === 'pages') {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.createNewPage', true);
$pageTitle = sprintf($label, $tableTitle);
} else {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.createNewRecord', true);
if ($this->data['effectivePid'] === 0) {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.createNewRecordRootLevel', true);
}
$pageTitle = sprintf($label, $tableTitle, $pageTitle);
}
} else {
$icon = BackendUtility::wrapClickMenuOnIcon($icon, $table, $row['uid'], 1, '', '+copy,info,edit,view');
$newOrUid = ' <span class="typo3-TCEforms-recUid">[' . htmlspecialchars($row['uid']) . ']</span>';
// @todo: getRecordTitlePrep applies an htmlspecialchars here
$recordLabel = BackendUtility::getRecordTitlePrep($this->data['recordTitle']);
if ($table === 'pages') {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.editPage', true);
$pageTitle = sprintf($label, $tableTitle, $recordLabel);
} else {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.editRecord', true);
$workspacedPageRecord = BackendUtility::getRecordWSOL('pages', $row['pid'], 'uid,title');
$pageTitle = BackendUtility::getRecordTitle('pages', $workspacedPageRecord, true, false);
if (empty($recordLabel)) {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.editRecordNoTitle', true);
}
if ($this->data['effectivePid'] === 0) {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.editRecordRootLevel', true);
}
if (!empty($recordLabel)) {
// Use record title and prepend an edit label.
$pageTitle = sprintf($label, $tableTitle, $recordLabel, $pageTitle);
} else {
// Leave out the record title since it is not set.
$pageTitle = sprintf($label, $tableTitle, $pageTitle);
}
}
}
$html = array();
$html[] = '<h1>' . $pageTitle . '</h1>';
$html[] = '<div class="typo3-TCEforms">';
$html[] = $childHtml;
$html[] = '<div class="help-block text-right">';
$html[] = $icon . ' <strong>' . htmlspecialchars($tableTitle) . '</strong>' . ' ' . $newOrUid;
$html[] = '</div>';
$html[] = '</div>';
$result['html'] = implode(LF, $html);
return $result;
}
示例4: formatFileList
/**
* This returns tablerows for the files in the array $items['sorting'].
*
* @param File[] $files File items
* @return string HTML table rows.
*/
public function formatFileList(array $files)
{
$out = '';
// first two keys are "0" (default) and "-1" (multiple), after that comes the "other languages"
$allSystemLanguages = GeneralUtility::makeInstance(TranslationConfigurationProvider::class)->getSystemLanguages();
$systemLanguages = array_filter($allSystemLanguages, function ($languageRecord) {
if ($languageRecord['uid'] === -1 || $languageRecord['uid'] === 0 || !$this->getBackendUser()->checkLanguageAccess($languageRecord['uid'])) {
return false;
} else {
return true;
}
});
foreach ($files as $fileObject) {
// Initialization
$this->counter++;
$this->totalbytes += $fileObject->getSize();
$ext = $fileObject->getExtension();
$fileName = trim($fileObject->getName());
// The icon with link
$theIcon = '<span title="' . htmlspecialchars($fileName . ' [' . (int) $fileObject->getUid() . ']') . '">' . $this->iconFactory->getIconForResource($fileObject, Icon::SIZE_SMALL)->render() . '</span>';
if ($this->clickMenus) {
$theIcon = BackendUtility::wrapClickMenuOnIcon($theIcon, $fileObject->getCombinedIdentifier());
}
// Preparing and getting the data-array
$theData = array();
foreach ($this->fieldArray as $field) {
switch ($field) {
case 'size':
$theData[$field] = GeneralUtility::formatSize($fileObject->getSize(), $this->getLanguageService()->getLL('byteSizeUnits', true));
break;
case 'rw':
$theData[$field] = '' . (!$fileObject->checkActionPermission('read') ? ' ' : '<strong class="text-danger">' . $this->getLanguageService()->getLL('read', true) . '</strong>') . (!$fileObject->checkActionPermission('write') ? '' : '<strong class="text-danger">' . $this->getLanguageService()->getLL('write', true) . '</strong>');
break;
case 'fileext':
$theData[$field] = strtoupper($ext);
break;
case 'tstamp':
$theData[$field] = BackendUtility::date($fileObject->getModificationTime());
break;
case '_CONTROL_':
$theData[$field] = $this->makeEdit($fileObject);
break;
case '_CLIPBOARD_':
$theData[$field] = $this->makeClip($fileObject);
break;
case '_LOCALIZATION_':
if (!empty($systemLanguages) && $fileObject->isIndexed() && $fileObject->checkActionPermission('write') && $this->getBackendUser()->check('tables_modify', 'sys_file_metadata')) {
$metaDataRecord = $fileObject->_getMetaData();
$translations = $this->getTranslationsForMetaData($metaDataRecord);
$languageCode = '';
foreach ($systemLanguages as $language) {
$languageId = $language['uid'];
$flagIcon = $language['flagIcon'];
if (array_key_exists($languageId, $translations)) {
$title = htmlspecialchars(sprintf($this->getLanguageService()->getLL('editMetadataForLanguage'), $language['title']));
// @todo the overlay for the flag needs to be added ($flagIcon . '-overlay')
$urlParameters = ['edit' => ['sys_file_metadata' => [$translations[$languageId]['uid'] => 'edit']], 'returnUrl' => $this->listURL()];
$flagButtonIcon = $this->iconFactory->getIcon($flagIcon, Icon::SIZE_SMALL, 'overlay-edit')->render();
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$languageCode .= '<a href="' . htmlspecialchars($url) . '" class="btn btn-default" title="' . $title . '">' . $flagButtonIcon . '</a>';
} else {
$parameters = ['justLocalized' => 'sys_file_metadata:' . $metaDataRecord['uid'] . ':' . $languageId, 'returnUrl' => $this->listURL()];
$returnUrl = BackendUtility::getModuleUrl('record_edit', $parameters);
$href = BackendUtility::getLinkToDataHandlerAction('&cmd[sys_file_metadata][' . $metaDataRecord['uid'] . '][localize]=' . $languageId, $returnUrl);
$flagButtonIcon = '<span title="' . htmlspecialchars(sprintf($this->getLanguageService()->getLL('createMetadataForLanguage'), $language['title'])) . '">' . $this->iconFactory->getIcon($flagIcon, Icon::SIZE_SMALL, 'overlay-new')->render() . '</span>';
$languageCode .= '<a href="' . htmlspecialchars($href) . '" class="btn btn-default">' . $flagButtonIcon . '</a> ';
}
}
// Hide flag button bar when not translated yet
$theData[$field] = ' <div class="localisationData btn-group" data-fileid="' . $fileObject->getUid() . '"' . (empty($translations) ? ' style="display: none;"' : '') . '>' . $languageCode . '</div>';
$theData[$field] .= '<a class="btn btn-default filelist-translationToggler" data-fileid="' . $fileObject->getUid() . '">' . '<span title="' . $this->getLanguageService()->getLL('translateMetadata', true) . '">' . $this->iconFactory->getIcon('mimetypes-x-content-page-language-overlay', Icon::SIZE_SMALL)->render() . '</span>' . '</a>';
}
break;
case '_REF_':
$theData[$field] = $this->makeRef($fileObject);
break;
case 'file':
// Edit metadata of file
$theData[$field] = $this->linkWrapFile(htmlspecialchars($fileName), $fileObject);
if ($fileObject->isMissing()) {
$flashMessage = \TYPO3\CMS\Core\Resource\Utility\BackendUtility::getFlashMessageForMissingFile($fileObject);
$theData[$field] .= $flashMessage->render();
// Thumbnails?
} elseif ($this->thumbs && ($this->isImage($ext) || $this->isMediaFile($ext))) {
$processedFile = $fileObject->process(ProcessedFile::CONTEXT_IMAGEPREVIEW, array());
if ($processedFile) {
$thumbUrl = $processedFile->getPublicUrl(true);
$theData[$field] .= '<br /><img src="' . $thumbUrl . '" ' . 'width="' . $processedFile->getProperty('width') . '" ' . 'height="' . $processedFile->getProperty('height') . '" ' . 'title="' . htmlspecialchars($fileName) . '" alt="" />';
}
}
break;
default:
$theData[$field] = '';
if ($fileObject->hasProperty($field)) {
//.........这里部分代码省略.........
示例5: wrapTitle
/**
* Wrapping $title in a-tags.
*
* @param string $title Title string
* @param \TYPO3\CMS\Core\Resource\Folder $folderObject the folder record
* @param int $bank Bank pointer (which mount point number)
* @return string
* @internal
*/
public function wrapTitle($title, $folderObject, $bank = 0)
{
// Check storage access to wrap with click menu
if ($folderObject instanceof InaccessibleFolder) {
return $title;
}
$aOnClick = 'return jumpTo(' . GeneralUtility::quoteJSvalue($this->getJumpToParam($folderObject)) . ', this, ' . GeneralUtility::quoteJSvalue($this->domIdPrefix . $this->getId($folderObject)) . ', ' . $bank . ');';
$clickMenuParts = BackendUtility::wrapClickMenuOnIcon('', $folderObject->getCombinedIdentifier(), '', 0, '&bank=' . $this->bank, '', true);
return '<a href="#" title="' . htmlspecialchars(strip_tags($title)) . '" onclick="' . htmlspecialchars($aOnClick) . '" ' . GeneralUtility::implodeAttributes($clickMenuParts) . '>' . $title . '</a>';
}
示例6: getPageInfo
/**
* Setting page icon with clickmenu + uid for docheader
*
* @param array $pageRecord Current page
* @return string Page info
*/
protected function getPageInfo($pageRecord)
{
// Add icon with clickmenu, etc:
// If there IS a real page
if (is_array($pageRecord) && $pageRecord['uid']) {
$alttext = BackendUtility::getRecordIconAltText($pageRecord, 'pages');
$iconImg = '<span title="' . htmlspecialchars($alttext) . '">' . $this->iconFactory->getIconForRecord('pages', $pageRecord, Icon::SIZE_SMALL)->render() . '</span>';
// Make Icon:
$theIcon = BackendUtility::wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
$uid = $pageRecord['uid'];
$title = BackendUtility::getRecordTitle('pages', $pageRecord);
} else {
// On root-level of page tree
// Make Icon
$iconImg = '<span title="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '">' . $this->iconFactory->getIcon('apps-pagetree-root', Icon::SIZE_SMALL)->render() . '</span>';
if ($GLOBALS['BE_USER']->user['admin']) {
$theIcon = BackendUtility::wrapClickMenuOnIcon($iconImg, 'pages', 0);
} else {
$theIcon = $iconImg;
}
$uid = '0';
$title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
}
// Setting icon with clickmenu + uid
$pageInfo = $theIcon . '<strong>' . htmlspecialchars($title) . ' [' . $uid . ']</strong>';
return $pageInfo;
}
示例7: renderListRow
/**
* Rendering a single row for the list
*
* @param string $table Table name
* @param mixed[] $row Current record
* @param int $cc Counter, counting for each time an element is rendered (used for alternating colors)
* @param string $titleCol Table field (column) where header value is found
* @param string $thumbsCol Table field (column) where (possible) thumbnails can be found
* @param int $indent Indent from left.
* @param integer $level
* @param string $expanded
*
* @return string Table row for the element
* @access private
* @see getTable()
*/
public function renderListRow($table, $row, $cc, $titleCol, $thumbsCol, $indent = 0, $level = 0, $expanded = '')
{
if (!is_array($row)) {
return '';
}
$rowOutput = '';
$id_orig = null;
// If in search mode, make sure the preview will show the correct page
if ((string) $this->searchString !== '') {
$id_orig = $this->id;
$this->id = $row['pid'];
}
// Add special classes for first and last row
$rowSpecial = '';
if ($cc == 1 && $indent == 0) {
$rowSpecial .= ' firstcol';
}
if ($cc == $this->totalRowCount || $cc == $this->iLimit) {
$rowSpecial .= ' lastcol';
}
$row_bgColor = ' class="' . $rowSpecial . '"';
// Overriding with versions background color if any:
$row_bgColor = $row['_CSSCLASS'] ? ' class="' . $row['_CSSCLASS'] . '"' : $row_bgColor;
// Incr. counter.
$this->counter++;
// The icon with link
$altText = BackendUtility::getRecordIconAltText($row, $table);
$additionalStyle = $indent ? ' style="margin-left: ' . $indent . 'px;"' : '';
$iconImg = '<span title="' . $altText . '" ' . $additionalStyle . '>' . $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render() . '</span>';
$theIcon = $this->clickMenuEnabled ? BackendUtility::wrapClickMenuOnIcon($iconImg, $table, $row['uid']) : $iconImg;
// Preparing and getting the data-array
$theData = array();
$localizationMarkerClass = '';
$lC2 = '';
foreach ($this->fieldArray as $fCol) {
if ($fCol == $titleCol) {
$recTitle = BackendUtility::getRecordTitle($table, $row, false, true);
$warning = '';
// If the record is edit-locked by another user, we will show a little warning sign:
$lockInfo = BackendUtility::isRecordLocked($table, $row['uid']);
if ($lockInfo) {
$warning = '<a href="#" onclick="alert(' . GeneralUtility::quoteJSvalue($lockInfo['msg']) . '); return false;" title="' . htmlspecialchars($lockInfo['msg']) . '">' . $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</a>';
}
$theData[$fCol] = $theData['__label'] = $warning . $this->linkWrapItems($table, $row['uid'], $recTitle, $row);
// Render thumbnails, if:
// - a thumbnail column exists
// - there is content in it
// - the thumbnail column is visible for the current type
$type = 0;
if (isset($GLOBALS['TCA'][$table]['ctrl']['type'])) {
$typeColumn = $GLOBALS['TCA'][$table]['ctrl']['type'];
$type = $row[$typeColumn];
}
// If current type doesn't exist, set it to 0 (or to 1 for historical reasons,
// if 0 doesn't exist)
if (!isset($GLOBALS['TCA'][$table]['types'][$type])) {
$type = isset($GLOBALS['TCA'][$table]['types'][0]) ? 0 : 1;
}
$visibleColumns = $GLOBALS['TCA'][$table]['types'][$type]['showitem'];
if ($this->thumbs && trim($row[$thumbsCol]) && preg_match('/(^|(.*(;|,)?))' . $thumbsCol . '(((;|,).*)|$)/', $visibleColumns) === 1) {
$theData[$fCol] .= '<br />' . $this->thumbCode($row, $table, $thumbsCol);
}
if (isset($GLOBALS['TCA'][$table]['ctrl']['languageField']) && $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] != 0 && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0) {
// It's a translated record with a language parent
$localizationMarkerClass = ' localization';
}
} elseif ($fCol == 'pid') {
$theData[$fCol] = $row[$fCol];
} elseif ($fCol == '_PATH_') {
$theData[$fCol] = $this->recPath($row['pid']);
} elseif ($fCol == '_REF_') {
$theData[$fCol] = $this->createReferenceHtml($table, $row['uid']);
} elseif ($fCol == '_CONTROL_') {
$theData[$fCol] = $this->makeControl($table, $row, $level);
} elseif ($fCol == '_CLIPBOARD_') {
$theData[$fCol] = $this->makeClip($table, $row);
} elseif ($fCol == '_LOCALIZATION_') {
list($lC1, $lC2) = $this->makeLocalizationPanel($table, $row);
$theData[$fCol] = $lC1;
} elseif ($fCol != '_LOCALIZATION_b') {
$tmpProc = BackendUtility::getProcessedValueExtra($table, $fCol, $row[$fCol], 100, $row['uid']);
$theData[$fCol] = $this->linkUrlMail(htmlspecialchars($tmpProc), $row[$fCol]);
if ($this->csvOutput) {
$row[$fCol] = BackendUtility::getProcessedValueExtra($table, $fCol, $row[$fCol], 0, $row['uid']);
//.........这里部分代码省略.........
示例8: main
/**
* Main function of class
*
* @return string HTML output
*/
public function main()
{
$pageId = (int) GeneralUtility::_GP('id');
if ($pageId === 0) {
$this->view->assign('pageZero', 1);
$this->view->assign('overviewOfPagesUsingTSConfig', $this->getOverviewOfPagesUsingTSConfig());
} else {
if ($this->pObj->MOD_SETTINGS['tsconf_parts'] == 99) {
$TSparts = BackendUtility::getPagesTSconfig($this->pObj->id, null, true);
$lines = array();
$pUids = array();
foreach ($TSparts as $k => $v) {
if ($k != 'uid_0') {
$line = array();
if ($k == 'defaultPageTSconfig') {
$line['defaultPageTSconfig'] = 1;
} else {
$pUids[] = substr($k, 4);
$row = BackendUtility::getRecordWSOL('pages', substr($k, 4));
$icon = $this->iconFactory->getIconForRecord('pages', $row, Icon::SIZE_SMALL);
$editIdList = substr($k, 4);
$urlParameters = ['edit' => ['pages' => [$editIdList => 'edit']], 'columnsOnly' => 'TSconfig', 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')];
$line['editIcon'] = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$line['editTitle'] = 'editTSconfig';
$line['title'] = BackendUtility::wrapClickMenuOnIcon($icon, 'pages', $row['uid']) . ' ' . htmlspecialchars(BackendUtility::getRecordTitle('pages', $row));
}
$tsparser = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
$tsparser->lineNumberOffset = 0;
$line['content'] = $tsparser->doSyntaxHighlight(trim($v) . LF);
$lines[] = $line;
}
}
if (!empty($pUids)) {
$urlParameters = ['edit' => ['pages' => [implode(',', $pUids) => 'edit']], 'columnsOnly' => 'TSconfig', 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')];
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$editIcon = htmlspecialchars($url);
$editTitle = 'editTSconfig_all';
} else {
$editIcon = '';
$editTitle = '';
}
$this->view->assign('tsconfParts99', 1);
$this->view->assign('csh', BackendUtility::cshItem('_MOD_web_info', 'tsconfig_edit', null, '|'));
$this->view->assign('lines', $lines);
$this->view->assign('editIcon', $editIcon);
$this->view->assign('editTitle', $editTitle);
} else {
$this->view->assign('tsconfParts99', 0);
// Defined global here!
$tmpl = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::class);
// Do not log time-performance information
$tmpl->tt_track = 0;
$tmpl->fixedLgd = 0;
$tmpl->linkObjects = 0;
$tmpl->bType = '';
$tmpl->ext_expandAllNotes = 1;
$tmpl->ext_noPMicons = 1;
$beUser = $this->getBackendUser();
switch ($this->pObj->MOD_SETTINGS['tsconf_parts']) {
case '1':
$modTSconfig = BackendUtility::getModTSconfig($this->pObj->id, 'mod');
break;
case '1a':
$modTSconfig = $beUser->getTSConfig('mod.web_layout', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1b':
$modTSconfig = $beUser->getTSConfig('mod.web_view', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1c':
$modTSconfig = $beUser->getTSConfig('mod.web_modules', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1d':
$modTSconfig = $beUser->getTSConfig('mod.web_list', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1e':
$modTSconfig = $beUser->getTSConfig('mod.web_info', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1f':
$modTSconfig = $beUser->getTSConfig('mod.web_func', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1g':
$modTSconfig = $beUser->getTSConfig('mod.web_ts', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '2':
$modTSconfig = $beUser->getTSConfig('RTE', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '5':
$modTSconfig = $beUser->getTSConfig('TCEFORM', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '6':
$modTSconfig = $beUser->getTSConfig('TCEMAIN', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '3':
$modTSconfig = $beUser->getTSConfig('TSFE', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
//.........这里部分代码省略.........
示例9: getPageRecordData
/**
* Get the rendered page title including onclick menu
*
* @param $detailPid
* @return string
*/
public function getPageRecordData($detailPid)
{
$pageRecord = BackendUtilityCore::getRecord('pages', $detailPid);
if (is_array($pageRecord)) {
$data = '<span title="Uid: ' . htmlspecialchars($pageRecord['uid']) . '">' . $this->iconFactory->getIconForRecord('pages', $pageRecord, Icon::SIZE_SMALL)->render() . '</span>' . htmlspecialchars(BackendUtilityCore::getRecordTitle('pages', $pageRecord));
$content = BackendUtilityCore::wrapClickMenuOnIcon($data, 'pages', $pageRecord['uid'], true, '', '+info,edit');
} else {
/** @var $message FlashMessage */
$text = sprintf($this->getLanguageService()->sL(self::LLPATH . 'pagemodule.pageNotAvailable', true), $detailPid);
$message = GeneralUtility::makeInstance(FlashMessage::class, $text, '', FlashMessage::WARNING);
$content = $message->render();
}
return $content;
}
示例10: main
/**
* Main function of class
*
* @return string HTML output
*/
public function main()
{
if ((int) GeneralUtility::_GP('id') === 0) {
$lang = $this->getLanguageService();
return '<div class="nowrap"><div class="table-fit"><table class="table table-striped table-hover" id="tsconfig-overview">' . '<thead>' . '<tr>' . '<th>' . $lang->getLL('pagetitle') . '</th>' . '<th>' . $lang->getLL('included_tsconfig_files') . '</th>' . '<th>' . $lang->getLL('written_tsconfig_lines') . '</th>' . '</tr>' . '</thead>' . '<tbody>' . implode('', $this->getOverviewOfPagesUsingTSConfig()) . '</tbody>' . '</table></div>';
} else {
$menu = '<div class="form-inline form-inline-spaced">';
$menu .= BackendUtility::getDropdownMenu($this->pObj->id, 'SET[tsconf_parts]', $this->pObj->MOD_SETTINGS['tsconf_parts'], $this->pObj->MOD_MENU['tsconf_parts']);
$menu .= '<div class="checkbox"><label for="checkTsconf_alphaSort">' . BackendUtility::getFuncCheck($this->pObj->id, 'SET[tsconf_alphaSort]', $this->pObj->MOD_SETTINGS['tsconf_alphaSort'], '', '', 'id="checkTsconf_alphaSort"') . ' ' . $this->getLanguageService()->getLL('sort_alphabetic', true) . '</label></div>';
$menu .= '</div>';
$theOutput = '<h1>' . htmlspecialchars($this->getLanguageService()->getLL('tsconf_title')) . '</h1>';
if ($this->pObj->MOD_SETTINGS['tsconf_parts'] == 99) {
$TSparts = BackendUtility::getPagesTSconfig($this->pObj->id, null, true);
$lines = array();
$pUids = array();
foreach ($TSparts as $k => $v) {
if ($k != 'uid_0') {
if ($k == 'defaultPageTSconfig') {
$pTitle = '<strong>' . $this->getLanguageService()->getLL('editTSconfig_default', true) . '</strong>';
$editIcon = '';
} else {
$pUids[] = substr($k, 4);
$row = BackendUtility::getRecordWSOL('pages', substr($k, 4));
$icon = $this->iconFactory->getIconForRecord('pages', $row, Icon::SIZE_SMALL);
$pTitle = BackendUtility::wrapClickMenuOnIcon($icon, 'pages', $row['uid']) . ' ' . htmlspecialchars(BackendUtility::getRecordTitle('pages', $row));
$editIdList = substr($k, 4);
$urlParameters = ['edit' => ['pages' => [$editIdList => 'edit']], 'columnsOnly' => 'TSconfig', 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')];
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$editIcon = '<a href="' . htmlspecialchars($url) . '" title="' . $this->getLanguageService()->getLL('editTSconfig', true) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '</a>';
}
$TScontent = nl2br(htmlspecialchars(trim($v) . LF));
$tsparser = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::class);
$tsparser->lineNumberOffset = 0;
$TScontent = $tsparser->doSyntaxHighlight(trim($v) . LF);
$lines[] = '
<tr><td nowrap="nowrap" class="bgColor5">' . $pTitle . '</td></tr>
<tr><td nowrap="nowrap" class="bgColor4">' . $TScontent . $editIcon . '</td></tr>
<tr><td> </td></tr>
';
}
}
if (!empty($pUids)) {
$urlParameters = ['edit' => ['pages' => [implode(',', $pUids) => 'edit']], 'columnsOnly' => 'TSconfig', 'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')];
$url = BackendUtility::getModuleUrl('record_edit', $urlParameters);
$editIcon = '<a href="' . htmlspecialchars($url) . '" title="' . $this->getLanguageService()->getLL('editTSconfig_all', true) . '">' . $this->iconFactory->getIcon('actions-document-open', Icon::SIZE_SMALL)->render() . '<strong>' . $this->getLanguageService()->getLL('editTSconfig_all', true) . '</strong>' . '</a>';
} else {
$editIcon = '';
}
$theOutput .= '<div>';
$theOutput .= BackendUtility::cshItem('_MOD_web_info', 'tsconfig_edit', null, '<span class="btn btn-default btn-sm">|</span>') . $menu . '
<!-- Edit fields: -->
<table border="0" cellpadding="0" cellspacing="1">' . implode('', $lines) . '</table><br />' . $editIcon;
$theOutput .= '</div>';
} else {
// Defined global here!
$tmpl = GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::class);
// Do not log time-performance information
$tmpl->tt_track = 0;
$tmpl->fixedLgd = 0;
$tmpl->linkObjects = 0;
$tmpl->bType = '';
$tmpl->ext_expandAllNotes = 1;
$tmpl->ext_noPMicons = 1;
$beUser = $this->getBackendUser();
switch ($this->pObj->MOD_SETTINGS['tsconf_parts']) {
case '1':
$modTSconfig = BackendUtility::getModTSconfig($this->pObj->id, 'mod');
break;
case '1a':
$modTSconfig = $beUser->getTSConfig('mod.web_layout', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1b':
$modTSconfig = $beUser->getTSConfig('mod.web_view', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1c':
$modTSconfig = $beUser->getTSConfig('mod.web_modules', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1d':
$modTSconfig = $beUser->getTSConfig('mod.web_list', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1e':
$modTSconfig = $beUser->getTSConfig('mod.web_info', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1f':
$modTSconfig = $beUser->getTSConfig('mod.web_func', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '1g':
$modTSconfig = $beUser->getTSConfig('mod.web_ts', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '2':
$modTSconfig = $beUser->getTSConfig('RTE', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
case '5':
$modTSconfig = $beUser->getTSConfig('TCEFORM', BackendUtility::getPagesTSconfig($this->pObj->id));
break;
//.........这里部分代码省略.........
示例11: wrapTitle
/**
* Wrapping $title in a-tags.
*
* @param string $title Title string
* @param string $row Item record
* @param int $bank Bank pointer (which mount point number)
* @return string
* @access private
*/
public function wrapTitle($title, $row, $bank = 0)
{
// Hook for overriding the page title
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.webpagetree.php']['pageTitleOverlay'])) {
$_params = array('title' => &$title, 'row' => &$row);
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.webpagetree.php']['pageTitleOverlay'] as $_funcRef) {
GeneralUtility::callUserFunction($_funcRef, $_params, $this);
}
unset($_params);
}
$aOnClick = 'return jumpTo(' . GeneralUtility::quoteJSvalue($this->getJumpToParam($row)) . ',this,' . GeneralUtility::quoteJSvalue($this->domIdPrefix . $this->getId($row)) . ',' . $bank . ');';
$clickMenuParts = BackendUtility::wrapClickMenuOnIcon('', 'pages', $row['uid'], 0, '&bank=' . $this->bank, '', true);
$thePageTitle = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . GeneralUtility::implodeAttributes($clickMenuParts) . '>' . $title . '</a>';
// Wrap title in a drag/drop span.
return '<span class="list-tree-title dragTitle" id="dragTitleID_' . $row['uid'] . '">' . $thePageTitle . '</span>';
}
示例12: getRecordInformation
/**
* Setting page icon with clickMenu + uid for docheader
*
* @return string Record info
*/
public function getRecordInformation()
{
$pageRecord = $this->recordArray;
if (empty($pageRecord)) {
return '';
}
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$uid = '';
$title = '';
$additionalInfo = !empty($pageRecord['_additional_info']) ? $pageRecord['_additional_info'] : '';
// Add icon with clickMenu, etc:
// If there IS a real page
if (is_array($pageRecord) && $pageRecord['uid']) {
$toolTip = BackendUtility::getRecordToolTip($pageRecord, 'pages');
$iconImg = '<span ' . $toolTip . '>' . $iconFactory->getIconForRecord('pages', $pageRecord, Icon::SIZE_SMALL)->render() . '</span>';
// Make Icon:
$theIcon = BackendUtility::wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
$uid = $pageRecord['uid'];
$title = BackendUtility::getRecordTitle('pages', $pageRecord);
// If the module is about a FAL resource
} elseif (is_array($pageRecord) && !empty($pageRecord['combined_identifier'])) {
try {
$resourceObject = ResourceFactory::getInstance()->getInstance()->getObjectFromCombinedIdentifier($pageRecord['combined_identifier']);
$fileMountTitle = $resourceObject->getStorage()->getFileMounts()[$resourceObject->getIdentifier()]['title'];
$title = $fileMountTitle ?: $resourceObject->getName();
// If this is a folder but not in within file mount boundaries this is the root folder
if ($resourceObject instanceof FolderInterface && !$resourceObject->getStorage()->isWithinFileMountBoundaries($resourceObject)) {
$iconImg = '<span title="' . htmlspecialchars($title) . '">' . $iconFactory->getIconForResource($resourceObject, Icon::SIZE_SMALL, null, array('mount-root' => true))->render() . '</span>';
} else {
$iconImg = '<span title="' . htmlspecialchars($title) . '">' . $iconFactory->getIconForResource($resourceObject, Icon::SIZE_SMALL)->render() . '</span>';
}
$theIcon = BackendUtility::wrapClickMenuOnIcon($iconImg, $pageRecord['combined_identifier']);
} catch (ResourceDoesNotExistException $e) {
$theIcon = '';
}
} else {
// On root-level of page tree
// Make Icon
$iconImg = '<span title="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '">' . $iconFactory->getIcon('apps-pagetree-root', Icon::SIZE_SMALL)->render() . '</span>';
if ($this->getBackendUser()->isAdmin()) {
$theIcon = BackendUtility::wrapClickMenuOnIcon($iconImg, 'pages', 0);
} else {
$theIcon = $iconImg;
}
$uid = '0';
$title = $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'];
}
// Setting icon with clickMenu + uid
return $theIcon . ' <strong>' . htmlspecialchars($title) . ($uid !== '' ? ' [' . $uid . ']' : '') . '</strong>' . (!empty($additionalInfo) ? ' ' . htmlspecialchars($additionalInfo) : '');
}
示例13: renderListRow
/**
* Rendering a single row for the list
*
* @param string $table Table name
* @param mixed[] $row Current record
* @param int $cc Counter, counting for each time an element is rendered (used for alternating colors)
* @param string $titleCol Table field (column) where header value is found
* @param string $thumbsCol Table field (column) where (possible) thumbnails can be found
* @param int $indent Indent from left.
* @return string Table row for the element
* @access private
* @see getTable()
*/
public function renderListRow($table, $row, $cc, $titleCol, $thumbsCol, $indent = 0)
{
if (!is_array($row)) {
return '';
}
$rowOutput = '';
$id_orig = null;
// If in search mode, make sure the preview will show the correct page
if ((string) $this->searchString !== '') {
$id_orig = $this->id;
$this->id = $row['pid'];
}
// Add special classes for first and last row
$rowSpecial = '';
if ($cc == 1 && $indent == 0) {
$rowSpecial .= ' firstcol';
}
if ($cc == $this->totalRowCount || $cc == $this->iLimit) {
$rowSpecial .= ' lastcol';
}
$row_bgColor = ' class="' . $rowSpecial . '"';
// Overriding with versions background color if any:
$row_bgColor = $row['_CSSCLASS'] ? ' class="' . $row['_CSSCLASS'] . '"' : $row_bgColor;
// Incr. counter.
$this->counter++;
// The icon with link
$toolTip = BackendUtility::getRecordToolTip($row, $table);
$additionalStyle = $indent ? ' style="margin-left: ' . $indent . 'px;"' : '';
$iconImg = '<span ' . $toolTip . ' ' . $additionalStyle . '>' . $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render() . '</span>';
$theIcon = $this->clickMenuEnabled ? BackendUtility::wrapClickMenuOnIcon($iconImg, $table, $row['uid']) : $iconImg;
// Preparing and getting the data-array
$theData = array();
$localizationMarkerClass = '';
foreach ($this->fieldArray as $fCol) {
if ($fCol == $titleCol) {
$recTitle = BackendUtility::getRecordTitle($table, $row, false, true);
$warning = '';
// If the record is edit-locked by another user, we will show a little warning sign:
$lockInfo = BackendUtility::isRecordLocked($table, $row['uid']);
if ($lockInfo) {
$warning = '<a href="#" onclick="alert(' . GeneralUtility::quoteJSvalue($lockInfo['msg']) . '); return false;" title="' . htmlspecialchars($lockInfo['msg']) . '">' . $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</a>';
}
$theData[$fCol] = $theData['__label'] = $warning . $this->linkWrapItems($table, $row['uid'], $recTitle, $row);
// Render thumbnails, if:
// - a thumbnail column exists
// - there is content in it
// - the thumbnail column is visible for the current type
$type = 0;
if (isset($GLOBALS['TCA'][$table]['ctrl']['type'])) {
$typeColumn = $GLOBALS['TCA'][$table]['ctrl']['type'];
$type = $row[$typeColumn];
}
// If current type doesn't exist, set it to 0 (or to 1 for historical reasons,
// if 0 doesn't exist)
if (!isset($GLOBALS['TCA'][$table]['types'][$type])) {
$type = isset($GLOBALS['TCA'][$table]['types'][0]) ? 0 : 1;
}
$visibleColumns = $GLOBALS['TCA'][$table]['types'][$type]['showitem'];
if ($this->thumbs && trim($row[$thumbsCol]) && preg_match('/(^|(.*(;|,)?))' . $thumbsCol . '(((;|,).*)|$)/', $visibleColumns) === 1) {
$theData[$fCol] .= '<br />' . $this->thumbCode($row, $table, $thumbsCol);
}
if (isset($GLOBALS['TCA'][$table]['ctrl']['languageField']) && $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] != 0 && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0) {
// It's a translated record with a language parent
$localizationMarkerClass = ' localization';
}
} elseif ($fCol == 'pid') {
$theData[$fCol] = $row[$fCol];
} elseif ($fCol == '_PATH_') {
$theData[$fCol] = $this->recPath($row['pid']);
} elseif ($fCol == '_REF_') {
$theData[$fCol] = $this->createReferenceHtml($table, $row['uid']);
} elseif ($fCol == '_CONTROL_') {
$theData[$fCol] = $this->makeControl($table, $row);
} elseif ($fCol == '_CLIPBOARD_') {
$theData[$fCol] = $this->makeClip($table, $row);
} elseif ($fCol == '_LOCALIZATION_') {
list($lC1, $lC2) = $this->makeLocalizationPanel($table, $row);
$theData[$fCol] = $lC1;
$theData[$fCol . 'b'] = '<div class="btn-group">' . $lC2 . '</div>';
} elseif ($fCol == '_LOCALIZATION_b') {
// deliberately empty
} else {
$pageId = $table === 'pages' ? $row['uid'] : $row['pid'];
$tmpProc = BackendUtility::getProcessedValueExtra($table, $fCol, $row[$fCol], 100, $row['uid'], true, $pageId);
$theData[$fCol] = $this->linkUrlMail(htmlspecialchars($tmpProc), $row[$fCol]);
if ($this->csvOutput) {
$row[$fCol] = BackendUtility::getProcessedValueExtra($table, $fCol, $row[$fCol], 0, $row['uid']);
//.........这里部分代码省略.........
示例14: render
/**
* Entry method
*
* @return array As defined in initializeResultArray() of AbstractNode
*/
public function render()
{
$languageService = $this->getLanguageService();
$backendUser = $this->getBackendUserAuthentication();
$table = $this->data['tableName'];
$row = $this->data['databaseRow'];
$options = $this->data;
if (empty($this->data['fieldListToRender'])) {
$options['renderType'] = 'fullRecordContainer';
} else {
$options['renderType'] = 'listOfFieldsContainer';
}
$result = $this->nodeFactory->create($options)->render();
$childHtml = $result['html'];
$recordPath = '';
// @todo: what is this >= 0 check for? wsol cases?!
if ($this->data['effectivePid'] >= 0) {
$permissionsClause = $backendUser->getPagePermsClause(1);
$recordPath = BackendUtility::getRecordPath($this->data['effectivePid'], $permissionsClause, 15);
}
$iconFactory = GeneralUtility::makeInstance(IconFactory::class);
$icon = '<span title="' . htmlspecialchars($recordPath) . '">' . $iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render() . '</span>';
// @todo: Could this be done in a more clever way? Does it work at all?
$tableTitle = $languageService->sL($this->data['processedTca']['ctrl']['title']);
if ($this->data['command'] === 'new') {
$newOrUid = ' <span class="typo3-TCEforms-newToken">' . $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.new', true) . '</span>';
// @todo: There is quite some stuff do to for WS overlays ...
$workspacedPageRecord = BackendUtility::getRecordWSOL('pages', $this->data['effectivePid'], 'title');
$pageTitle = BackendUtility::getRecordTitle('pages', $workspacedPageRecord, true, false);
if ($table === 'pages') {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.createNewPage', true);
$pageTitle = sprintf($label, $tableTitle);
} else {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.createNewRecord', true);
if ($this->data['effectivePid'] === 0) {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.createNewRecordRootLevel', true);
}
$pageTitle = sprintf($label, $tableTitle, $pageTitle);
}
} else {
$icon = BackendUtility::wrapClickMenuOnIcon($icon, $table, $row['uid'], 1, '', '+copy,info,edit,view');
$newOrUid = ' <span class="typo3-TCEforms-recUid">[' . htmlspecialchars($row['uid']) . ']</span>';
// @todo: getRecordTitlePrep applies an htmlspecialchars here
$recordLabel = BackendUtility::getRecordTitlePrep($this->data['recordTitle']);
if ($table === 'pages') {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.editPage', true);
$pageTitle = sprintf($label, $tableTitle, $recordLabel);
} else {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.editRecord', true);
$workspacedPageRecord = BackendUtility::getRecordWSOL('pages', $row['pid'], 'uid,title');
$pageTitle = BackendUtility::getRecordTitle('pages', $workspacedPageRecord, true, false);
if (empty($recordLabel)) {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.editRecordNoTitle', true);
}
if ($this->data['effectivePid'] === 0) {
$label = $languageService->sL('LLL:EXT:lang/locallang_core.xlf:labels.editRecordRootLevel', true);
}
if (!empty($recordLabel)) {
// Use record title and prepend an edit label.
$pageTitle = sprintf($label, $tableTitle, $recordLabel, $pageTitle);
} else {
// Leave out the record title since it is not set.
$pageTitle = sprintf($label, $tableTitle, $pageTitle);
}
}
}
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/OuterWrapContainer.html'));
$descriptionColumn = !empty($this->data['processedTca']['ctrl']['descriptionColumn']) ? $this->data['processedTca']['ctrl']['descriptionColumn'] : null;
if ($descriptionColumn !== null) {
$title = $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.recordInformation');
$content = $this->data['databaseRow'][$descriptionColumn];
$view->assignMultiple(['infoBoxMessageTitle' => $title, 'infoBoxMessage' => $content]);
}
$view->assignMultiple(array('pageTitle' => $pageTitle, 'childHtml' => $childHtml, 'icon' => $icon, 'tableTitle' => $tableTitle, 'newOrUid' => $newOrUid));
$result['html'] = $view->render();
return $result;
}
示例15: wrapIcon
/**
* Wrapping the image tag, $icon, for the row, $row (except for mount points)
*
* @param string $icon The image tag for the icon
* @param array $row The row for the current element
* @return string The processed icon input value.
* @access private
*/
public function wrapIcon($icon, $row)
{
// Wrap icon in click-menu link.
$theIcon = '';
if (!$this->ext_IconMode) {
$theIcon = BackendUtility::wrapClickMenuOnIcon($icon, $this->treeName, $this->getId($row), 0);
} elseif ($this->ext_IconMode === 'titlelink') {
$aOnClick = 'return jumpTo(' . GeneralUtility::quoteJSvalue($this->getJumpToParam($row)) . ',this,' . GeneralUtility::quoteJSvalue($this->domIdPrefix . $this->getId($row)) . ',' . $this->bank . ');';
$theIcon = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">' . $icon . '</a>';
}
return $theIcon;
}