本文整理汇总了PHP中TYPO3\CMS\Backend\Template\DocumentTemplate::spacer方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentTemplate::spacer方法的具体用法?PHP DocumentTemplate::spacer怎么用?PHP DocumentTemplate::spacer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Template\DocumentTemplate
的用法示例。
在下文中一共展示了DocumentTemplate::spacer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: func_search
/**
* Search (Full / Advanced)
*
* @return void
* @todo Define visibility
*/
public function func_search()
{
global $LANG;
$fullsearch = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\QueryView');
$fullsearch->setFormName($this->formName);
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('search'));
$this->content .= $this->doc->spacer(5);
$menu2 = '';
if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
$menu2 = BackendUtility::getFuncMenu(0, 'SET[search]', $this->MOD_SETTINGS['search'], $this->MOD_MENU['search']);
}
if ($this->MOD_SETTINGS['search'] == 'query' && !$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopMenu']) {
$menu2 .= BackendUtility::getFuncMenu(0, 'SET[search_query_makeQuery]', $this->MOD_SETTINGS['search_query_makeQuery'], $this->MOD_MENU['search_query_makeQuery']) . '<br />';
}
if (!$GLOBALS['BE_USER']->userTS['mod.']['dbint.']['disableTopCheckboxes'] && $this->MOD_SETTINGS['search'] == 'query') {
$menu2 .= BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[search_query_smallparts]', $this->MOD_SETTINGS['search_query_smallparts'], '', '', 'id="checkSearch_query_smallparts"') . ' <label for="checkSearch_query_smallparts">' . $GLOBALS['LANG']->getLL('showSQL') . '</label><br />';
$menu2 .= BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[search_result_labels]', $this->MOD_SETTINGS['search_result_labels'], '', '', 'id="checkSearch_result_labels"') . ' <label for="checkSearch_result_labels">' . $GLOBALS['LANG']->getLL('useFormattedStrings') . '</label><br />';
$menu2 .= BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[labels_noprefix]', $this->MOD_SETTINGS['labels_noprefix'], '', '', 'id="checkLabels_noprefix"') . ' <label for="checkLabels_noprefix">' . $GLOBALS['LANG']->getLL('dontUseOrigValues') . '</label><br />';
$menu2 .= BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[options_sortlabel]', $this->MOD_SETTINGS['options_sortlabel'], '', '', 'id="checkOptions_sortlabel"') . ' <label for="checkOptions_sortlabel">' . $GLOBALS['LANG']->getLL('sortOptions') . '</label><br />';
$menu2 .= BackendUtility::getFuncCheck($GLOBALS['SOBE']->id, 'SET[show_deleted]', $this->MOD_SETTINGS['show_deleted'], '', '', 'id="checkShow_deleted"') . ' <label for="checkShow_deleted">' . $GLOBALS['LANG']->getLL('showDeleted') . '</label>';
}
$this->content .= $this->doc->section('', $menu2) . $this->doc->spacer(10);
switch ($this->MOD_SETTINGS['search']) {
case 'query':
$this->content .= $fullsearch->queryMaker();
break;
case 'raw':
default:
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('searchOptions'), $fullsearch->form(), FALSE, TRUE);
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('result'), $fullsearch->search(), FALSE, TRUE);
}
}
示例2: main
/**
* Main function to generate the content
*
* @return void
* @todo Define visibility
*/
public function main()
{
$this->content = $this->doc->header('Indexing Engine Statistics');
$this->content .= $this->doc->spacer(5);
switch ($this->MOD_SETTINGS['function']) {
case 'stat':
$this->content .= $this->doc->section('Records', $this->doc->table($this->getRecordsNumbers()), 0, 1);
$this->content .= $this->doc->spacer(15);
$this->content .= $this->doc->section('index_phash TYPES', $this->doc->table($this->getPhashTypes()), 1);
$this->content .= $this->doc->spacer(15);
break;
case 'externalDocs':
$this->content .= $this->doc->section('External documents', $this->doc->table($this->getPhashExternalDocs()), 0, 1);
$this->content .= $this->doc->spacer(15);
break;
case 'typo3pages':
$this->content .= $this->doc->section('TYPO3 Pages', $this->doc->table($this->getPhashT3pages()), 0, 1);
$this->content .= $this->doc->spacer(15);
break;
}
$docHeaderButtons = $this->getButtons();
$markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu(0, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $this->content);
$this->content = $this->doc->startPage('Indexing Engine Statistics');
$this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例3: main
/**
* Initialize module header etc and call extObjContent function
*
* @return void
*/
public function main()
{
// Access check...
// The page will show only if there is a valid page and if this page may be viewed by the user
$this->pageinfo = BackendUtility::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo);
if ($this->id && $access || $GLOBALS['BE_USER']->user['admin'] && !$this->id) {
if ($GLOBALS['BE_USER']->user['admin'] && !$this->id) {
$this->pageinfo = array('title' => '[root-level]', 'uid' => 0, 'pid' => 0);
}
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->doc->setModuleTemplate('EXT:info/Resources/Private/Templates/info.html');
$this->doc->tableLayout = array('0' => array('0' => array('<td valign="top"><strong>', '</strong></td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width="10" height="1" alt="" /></td><td valign="top"><strong>', '</strong></td>')), 'defRow' => array('0' => array('<td valign="top">', '</td>'), 'defCol' => array('<td><img src="' . $this->doc->backPath . 'clear.gif" width="10" height="1" alt="" /></td><td valign="top">', '</td>')));
// JavaScript
$this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int) $this->id . ';');
// Setting up the context sensitive menu:
$this->doc->getContextMenuCode();
$this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('web_info')) . '" method="post" name="webinfoForm">';
$vContent = $this->doc->getVersionSelector($this->id, 1);
if ($vContent) {
$this->content .= $this->doc->section('', $vContent);
}
$this->extObjContent();
// Setting up the buttons and markers for docheader
$docHeaderButtons = $this->getButtons();
$markers = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $this->content);
// Build the <body> for the module
$this->content = $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
} else {
// If no access or if ID == zero
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
$this->doc->backPath = $GLOBALS['BACK_PATH'];
$this->content = $this->doc->header($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->spacer(10);
}
// Renders the module page
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
}
示例4: render
/**
* Renders the content of the module.
*
* @return void
*/
public function render()
{
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
$this->content .= '<p class="lead">' . $GLOBALS['LANG']->getLL('description') . '</p>';
if ($this->isAccessibleForCurrentUser) {
$this->loadHeaderData();
// div container for renderTo
$this->content .= '<div id="recyclerContent"></div>';
} else {
// If no access or if ID == zero
$this->content .= $this->doc->spacer(10);
}
}
示例5: main
/**
* Main function, rendering the content of the rename form
*
* @return void
*/
public function main()
{
// Make page header:
$this->content = $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
$pageContent = $this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
$pageContent .= $this->doc->spacer(5);
$pageContent .= $this->doc->divider(5);
if ($this->fileOrFolderObject instanceof \TYPO3\CMS\Core\Resource\Folder) {
$fileIdentifier = $this->fileOrFolderObject->getCombinedIdentifier();
} else {
$fileIdentifier = $this->fileOrFolderObject->getUid();
}
$code = '<form action="tce_file.php" method="post" name="editform">';
// Making the formfields for renaming:
$code .= '
<div id="c-rename">
<input type="text" name="file[rename][0][target]" value="' . htmlspecialchars($this->fileOrFolderObject->getName()) . '"' . $GLOBALS['TBE_TEMPLATE']->formWidth(40) . ' />
<input type="hidden" name="file[rename][0][data]" value="' . htmlspecialchars($fileIdentifier) . '" />
</div>
';
// Making submit button:
$code .= '
<div id="c-submit">
<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_rename.php.submit', TRUE) . '" />
<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE) . '" onclick="backToList(); return false;" />
<input type="hidden" name="redirect" value="' . htmlspecialchars($this->returnUrl) . '" />
' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction') . '
</div>
';
$code .= '</form>';
// Add the HTML as a section:
$pageContent .= $code;
$docHeaderButtons = array('back' => '');
$docHeaderButtons['csh'] = BackendUtility::cshItem('xMOD_csh_corebe', 'file_rename', $GLOBALS['BACK_PATH']);
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisUrl($this->returnUrl)) . '" class="typo3-goBack" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.goBack', TRUE) . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-go-back') . '</a>';
}
// Add the HTML as a section:
$markerArray = array('CSH' => $docHeaderButtons['csh'], 'FUNC_MENU' => BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']), 'CONTENT' => $pageContent, 'PATH' => $this->title);
$this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
$this->content .= $this->doc->endPage();
$this->content = $this->doc->insertStylesAndJS($this->content);
}
示例6: main
/**
* Main function of the module. Write the content to $this->content
*
* @return void
*/
public function main()
{
// Access check!
// The page will show only if user has admin rights
if ($GLOBALS['BE_USER']->user['admin']) {
// Set the form
//$this->doc->form = '<form name="tx_kickstarter_form" id="tx_kickstarter_form" method="post" action="">';
// Prepare main content
$this->content = $this->doc->header($GLOBALS['LANG']->getLL('function.' . $this->MOD_SETTINGS['function']));
$this->content .= $this->getModuleContent();
} else {
// If no access, only display the module's title
$this->content = $this->doc->header($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->spacer(5);
}
// Place content inside template
$content = $this->doc->moduleBody(array(), $this->getDocHeaderButtons(), $this->getTemplateMarkers());
// Renders the module page
$this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $content);
}
示例7: main
/**
* Main Method, rendering either colorpicker or frameset depending on ->showPicker
*
* @return void
*/
public function main()
{
$lang = $this->getLanguageService();
$resourcePath = ExtensionManagementUtility::extRelPath('backend') . 'Resources/Public/Images/BackendLayoutWizard/';
$content = '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());return true;">' . IconUtility::getSpriteIcon('actions-document-save') . '</a>';
$content .= '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) . '" onclick="storeData(t3Grid.export2LayoutRecord());window.close();return true;">' . IconUtility::getSpriteIcon('actions-document-save-close') . '</a>';
$content .= '<a href="#" title="' . $lang->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc', TRUE) . '" onclick="window.close();return true;">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>';
$content .= $this->doc->spacer(10);
$content .= '
<table border="0" width="90%" height="90%" id="outer_container">
<tr>
<td class="editor_cell">
<div id="editor">
</div>
</td>
<td width="20" valign="center">
<a class="addCol" href="#" title="' . $lang->getLL('grid_addColumn') . '" onclick="t3Grid.addColumn(); t3Grid.drawTable(\'editor\');">
<img src="' . $resourcePath . 't3grid-tableright.png" border="0" />
</a><br />
<a class="removeCol" href="#" title="' . $lang->getLL('grid_removeColumn') . '" onclick="t3Grid.removeColumn(); t3Grid.drawTable(\'editor\');">
<img src="' . $resourcePath . 't3grid-tableleft.png" border="0" />
</a>
</td>
</tr>
<tr>
<td colspan="2" height="20" align="center">
<a class="addCol" href="#" title="' . $lang->getLL('grid_addRow') . '" onclick="t3Grid.addRow(); t3Grid.drawTable(\'editor\');">
<img src="' . $resourcePath . 't3grid-tabledown.png" border="0" />
</a>
<a class="removeCol" href="#" title="' . $lang->getLL('grid_removeRow') . '" onclick="t3Grid.removeRow(); t3Grid.drawTable(\'editor\');">
<img src="' . $resourcePath . 't3grid-tableup.png" border="0" />
</a>
</td>
</tr>
</table>
';
$this->content = $content;
}
示例8: 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;
}
示例9: main
/**
* Creating the module output.
*
* @return void
* @todo Define visibility
*/
public function main()
{
if ($this->id && $this->access) {
// Init position map object:
$posMap = GeneralUtility::makeInstance('ext_posMap');
$posMap->cur_sys_language = $this->sys_language;
$posMap->backPath = $GLOBALS['BACK_PATH'];
// If a column is pre-set:
if (isset($this->colPos)) {
if ($this->uid_pid < 0) {
$row = array();
$row['uid'] = abs($this->uid_pid);
} else {
$row = '';
}
$this->onClickEvent = $posMap->onClickInsertRecord($row, $this->colPos, '', $this->uid_pid, $this->sys_language);
} else {
$this->onClickEvent = '';
}
// ***************************
// Creating content
// ***************************
// use a wrapper div
$this->content .= '<div id="user-setup-wrapper">';
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('newContentElement'));
$this->content .= $this->doc->spacer(5);
// Wizard
$code = '';
$wizardItems = $this->getWizardItems();
// Wrapper for wizards
$this->elementWrapper['section'] = array('<ul class="contentelement-wizard list-unstyled">', '</ul>');
// Copy wrapper for tabs
$this->elementWrapperForTabs = $this->elementWrapper;
// Hook for manipulating wizardItems, wrapper, onClickEvent etc.
if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'] as $classData) {
$hookObject = GeneralUtility::getUserObj($classData);
if (!$hookObject instanceof \TYPO3\CMS\Backend\Wizard\NewContentElementWizardHookInterface) {
throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Backend\\Wizard\\NewContentElementWizardHookInterface', 1227834741);
}
$hookObject->manipulateWizardItems($wizardItems, $this);
}
}
if ($this->config['renderMode'] == 'tabs' && $this->elementWrapperForTabs != $this->elementWrapper) {
// Restore wrapper for tabs if they are overwritten in hook
$this->elementWrapper = $this->elementWrapperForTabs;
}
// Add document inline javascript
$this->doc->JScode = $this->doc->wrapScriptTags('
function goToalt_doc() { //
' . $this->onClickEvent . '
}
if(top.refreshMenu) {
top.refreshMenu();
} else {
top.TYPO3ModuleMenu.refreshMenu();
}
');
// Traverse items for the wizard.
// An item is either a header or an item rendered with a radio button and title/description and icon:
$cc = $key = 0;
$menuItems = array();
foreach ($wizardItems as $k => $wInfo) {
if ($wInfo['header']) {
$menuItems[] = array('label' => htmlspecialchars($wInfo['header']), 'content' => $this->elementWrapper['section'][0]);
$key = count($menuItems) - 1;
} else {
$content = '';
if (!$this->onClickEvent) {
// Radio button:
$oC = 'document.editForm.defValues.value=unescape(\'' . rawurlencode($wInfo['params']) . '\');goToalt_doc();' . (!$this->onClickEvent ? 'window.location.hash=\'#sel2\';' : '');
$content .= '<div class="contentelement-wizard-item-input"><input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($oC) . '" /></div>';
// Onclick action for icon/title:
$aOnClick = 'document.getElementsByName(\'tempB\')[' . $cc . '].checked=1;' . $oC . 'return false;';
} else {
$aOnClick = "document.editForm.defValues.value=unescape('" . rawurlencode($wInfo['params']) . "');goToalt_doc();" . (!$this->onClickEvent ? "window.location.hash='#sel2';" : '');
}
$menuItems[$key]['content'] .= '<li>
<div class="contentelement-wizard-item">
' . $content . '
<div class="contentelement-wizard-item-icon">
<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
<img' . IconUtility::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" />
</a>
</div>
<div class="contentelement-wizard-item-text">
<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
<strong>' . htmlspecialchars($wInfo['title']) . '</strong>
<br />' . nl2br(htmlspecialchars(trim($wInfo['description']))) . '</a>
</div>
</div>
</li>';
$cc++;
//.........这里部分代码省略.........
示例10: showCopyWizard
/**
* Shows the copy wizard.
*
* @param int $uidClip Uid of the clipped item
* @param int $uidTarget Uid of target
* @param string $command Command
*/
protected function showCopyWizard($uidClip, $uidTarget, $command)
{
$language = $this->getLanguageService();
$str = '';
$this->pageinfo = BackendUtility::readCategoryAccess($uidTarget, BackendUtility::getCategoryPermsClause(1));
$str .= $this->doc->header($language->getLL('Copy'));
$str .= $this->doc->spacer(5);
// flag if neither sorting nor localizations
// are existing and we can immediately copy
$noActionReq = false;
// First prepare user defined hooks
$hooks = \CommerceTeam\Commerce\Factory\HookFactory::getHooks('Utility/DataHandlerUtility', 'showCopyWizard');
switch ($command) {
case 'overwrite':
// pass through
// pass through
case 'pasteProduct':
// chose local to copy from product
/**
* Product.
*
* @var \CommerceTeam\Commerce\Domain\Model\Product $product
*/
$product = GeneralUtility::makeInstance('CommerceTeam\\Commerce\\Domain\\Model\\Product', $uidClip);
$product->loadData();
$prods = $product->getL18nProducts();
if (!empty($prods)) {
$str .= '<h1>' . $language->getLL('copy.head.l18n') . '</h1>
<h2>' . $language->getLL('copy.product') . ': ' . $product->getTitle() . '</h2>
<ul>';
// walk the l18n and get the selector box
$l = count($prods);
for ($i = 0; $i < $l; ++$i) {
$tmpProd = $prods[$i];
$flag = $tmpProd['flag'] != '' ? '<img src="' . $this->getBackPath() . 'gfx/flags/' . $tmpProd['flag'] . '" alt="Flag" />' : '';
$str .= '<li><input type="checkbox" name="locale[]" id="loc_' . $tmpProd['uid'] . '" value="' . $tmpProd['sys_language'] . '" /><label for="loc_' . $tmpProd['uid'] . '">' . $flag . $tmpProd['title'] . '</label></li>';
}
$str .= '</ul>';
}
$records = array();
// chose sorting position
if ($command != 'overwrite') {
// Initialize tree object:
/**
* Product data.
*
* @var \CommerceTeam\Commerce\Tree\Leaf\ProductData $productData
*/
$productData = GeneralUtility::makeInstance('CommerceTeam\\Commerce\\Tree\\Leaf\\ProductData');
$productData->init();
$records = $productData->getRecordsDbList($uidTarget);
}
$l = count($records['pid'][$uidTarget]);
// Hook: beforeFormClose
$userIgnoreClose = false;
foreach ($hooks as $hookObj) {
if (method_exists($hookObj, 'beforeFormClose')) {
// set $user_ignoreClose to true if you want to
// force the script to print out the execute button
$str .= $hookObj->beforeFormClose($uidClip, $uidTarget, $command, $userIgnoreClose);
}
}
if (0 >= $l && (!empty($prods) || $userIgnoreClose)) {
// no child object - sorting position is irrelevant - just print a submit button
// and notify users that there are not products in the category yet
$str .= '<input type="submit" value="' . $language->getLL('copy.submit') . '" />';
} elseif (0 < $l) {
// at least 1 item - offer choice
$icon = '<img' . IconUtility::skinImg($this->getBackPath(), 'gfx/newrecord_marker_d.gif', 'width="281" height="8"') . ' alt="" title="Insert the category" />';
$prodIcon = '<img' . IconUtility::skinImg($this->getBackPath(), IconUtility::getIcon('tx_commerce_products', array('uid' => $uidTarget)), 'width="18" height="16"') . 'align="top" class="c-recIcon"/>';
$str .= '<h1>' . $language->getLL('copy.position') . '</h1>';
$onClickAction = 'onclick="submitForm(' . $records['pid'][$uidTarget][0]['uid'] . ')"';
$str .= '<span class="nobr"><a href="javascript:void(0)" ' . $onClickAction . '>' . $icon . '</a></span><br />';
for ($i = 0; $i < $l; ++$i) {
$record = $records['pid'][$uidTarget][$i];
$onClickAction = 'onclick="submitForm(-' . $record['uid'] . ')"';
$str .= '<span class="nobr">' . $prodIcon . $record['title'] . '</span><br />';
$str .= '<span class="nobr"><a href="javascript:void(0)" ' . $onClickAction . '>' . $icon . '</a></span><br />';
}
} else {
$noActionReq = true;
}
break;
case 'pasteCategory':
// chose locale to copy from category
/**
* Category.
*
* @var \CommerceTeam\Commerce\Domain\Model\Category $category
*/
$category = GeneralUtility::makeInstance('CommerceTeam\\Commerce\\Domain\\Model\\Category', $uidClip);
$category->loadData();
$cats = $category->getL18nCategories();
//.........这里部分代码省略.........
示例11: getFileSearchField
/**
* Get the HTML data required for the file search field of the TYPO3 Element Browser.
*
* @return string HTML data required for the search field in the file list of the Element Browser
*/
protected function getFileSearchField()
{
$action = $this->getThisScript() . 'act=' . $this->act . '&mode=' . $this->mode . '&bparams=' . rawurlencode($this->bparams) . (is_array($this->P) ? GeneralUtility::implodeArrayForUrl('P', $this->P) : '');
$out = '
<form method="post" action="' . htmlspecialchars($action) . '">
<div class="input-group">
<input class="form-control" type="text" name="searchWord" value="' . htmlspecialchars($this->searchWord) . '">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">' . $this->getLanguageService()->sL('LLL:EXT:filelist/Resources/Private/Language/locallang.xlf:search', true) . '</button>
</span>
</div>
</form>';
$out .= $this->doc->spacer(15);
return $out;
}
示例12: main
//.........这里部分代码省略.........
ul {
list-style:none;
margin:0;
padding:0;
}
a.buttons, a.buttons_db {
-moz-border-radius:1px 1px 1px 1px;
BACKGROUND-IMAGE: url(' . $this->FULL_HTTP_URL . 'typo3/sysext/t3skin/images/backgrounds/button.png);
background-color:#F6F6F6;
background-image:-moz-linear-gradient(center top , #F6F6F6 10%, #D5D5D5 90%);
background-position:center bottom;
background-repeat:repeat-x;
border:1px solid #7C7C7C;
color:#434343;
display:block;
padding:2px 4px;
text-align:center;
font-family:Verdana,Arial,Helvetica,sans-serif;
font-size:11px;
line-height:16px;
}
a.buttons:hover, a.buttons_db:hover {
BACKGROUND-IMAGE: url(' . $this->FULL_HTTP_URL . 'typo3/sysext/t3skin/images/backgrounds/button-hover.png);
background-color:#C8C8C8;
background-image:-moz-linear-gradient(center top , #F6F6F6 10%, #BDBCBC 90%);
background-position:center bottom;
background-repeat:repeat-x;
border:1px solid #737F91;
color:#1E1E1E;
}
a.buttons {
width:142px;
}
a.buttons_db {
width:126px;
}
fieldset.mod1MultishopFieldset ul { overflow:hidden; width:100%; }
fieldset.mod1MultishopFieldset ul li { float:left; margin:0 10px 0 0; }
</style>
<!--[if IE]>
<style>
fieldset {
position: relative;
padding-top:15px;
margin:20px 0 0;
}
legend {
position: absolute;
top: -10px;
left: 10px;
}
</style>
<![endif]-->
<script language="javascript" type="text/javascript">
script_ended = 0;
function jumpToUrl(URL) {
document.location = URL;
}
function CONFIRM(label)
{
if (confirm(label))
{
return true;
}
else
{
return false;
}
}
</script>
';
$this->doc->postCode = '
<script language="javascript" type="text/javascript">
script_ended = 1;
if (top.fsMod) top.fsMod.recentIds["web"] = 0;
</script>
';
$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' . $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($this->pageinfo['_thePath'], 50);
$this->content .= $this->doc->startPage($LANG->getLL('title'));
$this->content .= $this->doc->header($LANG->getLL('title'));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
$this->content .= $this->doc->divider(5);
// Render content:
$this->moduleContent();
// ShortCut
if ($BE_USER->mayMakeShortcut()) {
$this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));
}
$this->content .= $this->doc->spacer(10);
} else {
// If no access or if ID == zero
$this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('mediumDoc');
$this->doc->backPath = $BACK_PATH;
$this->content .= $this->doc->startPage($LANG->getLL('title'));
$this->content .= $this->doc->header($LANG->getLL('title'));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->spacer(10);
}
}
示例13: renderListContent
//.........这里部分代码省略.........
$CMcounter = 0;
// Traverse the list of table names which has records on this page (that array is populated
// by the $dblist object during the function getTableMenu()):
foreach ($dbList->activeTables as $table => $value) {
$h_func_b = '';
if (!isset($dbList->externalTables[$table])) {
$q_count = $this->getNumberOfHiddenElements();
if ($q_count > 0) {
$h_func_b = '<div class="checkbox">' . '<label for="checkTt_content_showHidden">' . '<input type="checkbox" id="checkTt_content_showHidden" class="checkbox" name="SET[tt_content_showHidden]" value="1" ' . ($this->MOD_SETTINGS['tt_content_showHidden'] ? 'checked="checked"' : '') . ' />' . $this->getLanguageService()->getLL('hiddenCE', TRUE) . ' (<span class="t3js-hidden-counter">' . $q_count . '</span>)' . '</label>' . '</div>';
}
// Boolean: Display up/down arrows and edit icons for tt_content records
$dbList->tt_contentConfig['showCommands'] = 1;
// Boolean: Display info-marks or not
$dbList->tt_contentConfig['showInfo'] = 1;
// Setting up the tt_content columns to show:
if (is_array($GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['items'])) {
$colList = array();
$tcaItems = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getColPosListItemsParsed', $this->id, $this);
foreach ($tcaItems as $temp) {
$colList[] = $temp[1];
}
} else {
// ... should be impossible that colPos has no array. But this is the fallback should it make any sense:
$colList = array('1', '0', '2', '3');
}
if ($this->colPosList !== '') {
$colList = array_intersect(GeneralUtility::intExplode(',', $this->colPosList), $colList);
}
// The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
$dbList->tt_contentConfig['cols'] = implode(',', $colList);
$dbList->tt_contentConfig['activeCols'] = $this->activeColPosList;
$dbList->tt_contentConfig['showHidden'] = $this->MOD_SETTINGS['tt_content_showHidden'];
$dbList->tt_contentConfig['sys_language_uid'] = (int) $this->current_sys_language;
// If the function menu is set to "Language":
if ($this->MOD_SETTINGS['function'] == 2) {
$dbList->tt_contentConfig['languageMode'] = 1;
$dbList->tt_contentConfig['languageCols'] = $this->MOD_MENU['language'];
$dbList->tt_contentConfig['languageColsPointer'] = $this->current_sys_language;
}
} else {
if (isset($this->MOD_SETTINGS) && isset($this->MOD_MENU)) {
$h_func = BackendUtility::getFuncMenu($this->id, 'SET[' . $table . ']', $this->MOD_SETTINGS[$table], $this->MOD_MENU[$table], '', '');
} else {
$h_func = '';
}
}
// Start the dblist object:
$dbList->itemsLimitSingleTable = 1000;
$dbList->start($this->id, $table, $this->pointer, $this->search_field, $this->search_levels, $this->showLimit);
$dbList->counter = $CMcounter;
$dbList->ext_function = $this->MOD_SETTINGS['function'];
// Render versioning selector:
$dbList->HTMLcode .= $this->doc->getVersionSelector($this->id);
// Generate the list of elements here:
$dbList->generateList();
// Adding the list content to the tableOutput variable:
$tableOutput[$table] = ($h_func ? $h_func . '<br /><img src="clear.gif" width="1" height="4" alt="" /><br />' : '') . $dbList->HTMLcode . ($h_func_b ? '<img src="clear.gif" width="1" height="10" alt="" /><br />' . $h_func_b : '');
// ... and any accumulated JavaScript goes the same way!
$tableJSOutput[$table] = $dbList->JScode;
// Increase global counter:
$CMcounter += $dbList->counter;
// Reset variables after operation:
$dbList->HTMLcode = '';
$dbList->JScode = '';
$h_func = '';
}
// END: traverse tables
// For Context Sensitive Menus:
$this->doc->getContextMenuCode();
// Init the content
$content = '';
// Additional header content
$headerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawHeaderHook'];
if (is_array($headerContentHook)) {
foreach ($headerContentHook as $hook) {
$params = array();
$content .= GeneralUtility::callUserFunction($hook, $params, $this);
}
}
// Add the content for each table we have rendered (traversing $tableOutput variable)
foreach ($tableOutput as $table => $output) {
$content .= $this->doc->section('', $output, TRUE, TRUE, 0, TRUE);
$content .= $this->doc->spacer(15);
$content .= $this->doc->sectionEnd();
}
// Making search form:
if (!$this->modTSconfig['properties']['disableSearchBox'] && !empty($tableOutput)) {
$this->markers['BUTTONLIST_ADDITIONAL'] = '<a href="#" onclick="toggleSearchToolbox(); return false;" title="' . $this->getLanguageService()->sL('LLL:EXT:lang/locallang_core.xlf:labels.title.searchIcon', TRUE) . '">' . IconUtility::getSpriteIcon('apps-toolbar-menu-search') . '</a>';
$this->markers['SEARCHBOX'] = $dbList->getSearchBox(0);
}
// Additional footer content
$footerContentHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawFooterHook'];
if (is_array($footerContentHook)) {
foreach ($footerContentHook as $hook) {
$params = array();
$content .= GeneralUtility::callUserFunction($hook, $params, $this);
}
}
return $content;
}
示例14: versioningMgm
//.........这里部分代码省略.........
if ((string) $diff_1_record[$fN] !== (string) $diff_2_record[$fN]) {
$diffres = $t3lib_diff_Obj->makeDiffDisplay(BackendUtility::getProcessedValue($this->table, $fN, $diff_2_record[$fN], 0, 1), BackendUtility::getProcessedValue($this->table, $fN, $diff_1_record[$fN], 0, 1));
$tRows[] = '
<tr class="bgColor4">
<td>' . $fN . '</td>
<td width="98%">' . $diffres . '</td>
</tr>
';
}
}
}
if (count($tRows) > 1) {
$content .= '<table border="0" cellpadding="1" cellspacing="1" width="100%">' . implode('', $tRows) . '</table><br /><br />';
} else {
$content .= $GLOBALS['LANG']->getLL('recordsMatchesCompletely');
}
} else {
$content .= $GLOBALS['LANG']->getLL('errorRecordsNotFound');
}
} else {
$content .= $GLOBALS['LANG']->getLL('errorDiffSources');
}
}
// Element:
$record = BackendUtility::getRecord($this->table, $this->uid);
$recordIcon = IconUtility::getSpriteIconForRecord($this->table, $record);
$recTitle = BackendUtility::getRecordTitle($this->table, $record, TRUE);
// Display versions:
$content .= '
' . $recordIcon . $recTitle . '
<form name="theform" action="' . str_replace('&sendToReview=1', '', $this->REQUEST_URI) . '" method="post">
<table border="0" cellspacing="1" cellpadding="1">';
$content .= '
<tr class="bgColor5 tableheader">
<td> </td>
<td> </td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_title') . '">' . $GLOBALS['LANG']->getLL('tblHeader_title') . '</td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_uid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_uid') . '</td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_oid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_oid') . '</td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_id') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_id') . '</td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_wsid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_wsid') . '</td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_state') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_state') . '</td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_stage') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_stage') . '</td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_count') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_count') . '</td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_pid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_pid') . '</td>
<td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_label') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . '</td>
<td colspan="2"><input type="submit" name="do_diff" value="' . $GLOBALS['LANG']->getLL('diff') . '" /></td>
</tr>';
$versions = BackendUtility::selectVersionsOfRecord($this->table, $this->uid, '*', $GLOBALS['BE_USER']->workspace);
foreach ($versions as $row) {
$adminLinks = $this->adminLinks($this->table, $row);
$content .= '
<tr class="' . ($row['uid'] != $this->uid ? 'bgColor4' : 'bgColor2 tableheader') . '">
<td>' . ($row['uid'] != $this->uid ? '<a href="' . $this->doc->issueCommand('&cmd[' . $this->table . '][' . $this->uid . '][version][swapWith]=' . $row['uid'] . '&cmd[' . $this->table . '][' . $this->uid . '][version][action]=swap') . '" title="' . $GLOBALS['LANG']->getLL('swapWithCurrent', TRUE) . '">' . IconUtility::getSpriteIcon('actions-version-swap-version') . '</a>' : IconUtility::getSpriteIcon('status-status-current', array('title' => $GLOBALS['LANG']->getLL('currentOnlineVersion', TRUE)))) . '</td>
<td nowrap="nowrap">' . $adminLinks . '</td>
<td nowrap="nowrap">' . BackendUtility::getRecordTitle($this->table, $row, TRUE) . '</td>
<td>' . $row['uid'] . '</td>
<td>' . $row['t3ver_oid'] . '</td>
<td>' . $row['t3ver_id'] . '</td>
<td>' . $row['t3ver_wsid'] . '</td>
<td>' . $row['t3ver_state'] . '</td>
<td>' . $row['t3ver_stage'] . '</td>
<td>' . $row['t3ver_count'] . '</td>
<td>' . $row['pid'] . '</td>
<td nowrap="nowrap"><a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick('&edit[' . $this->table . '][' . $row['uid'] . ']=edit&columnsOnly=t3ver_label', $this->doc->backPath)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:cm.edit', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>' . htmlspecialchars($row['t3ver_label']) . '</td>
<td class="version-diff-1"><input type="radio" name="diff_1" value="' . $row['uid'] . '"' . ($diff_1 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
<td class="version-diff-2"><input type="radio" name="diff_2" value="' . $row['uid'] . '"' . ($diff_2 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
</tr>';
// Show sub-content if the table is pages AND it is not the online branch (because that will mostly render the WHOLE tree below - not smart;)
if ($this->table == 'pages' && $row['uid'] != $this->uid) {
$sub = $this->pageSubContent($row['uid']);
if ($sub) {
$content .= '
<tr>
<td></td>
<td></td>
<td colspan="10">' . $sub . '</td>
<td colspan="2"></td>
</tr>';
}
}
}
$content .= '</table></form>';
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('title'), $content, 0, 1);
// Create new:
$content = '
<form action="' . $this->doc->backPath . 'tce_db.php" method="post">
' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . ': <input type="text" name="cmd[' . $this->table . '][' . $this->uid . '][version][label]" /><br />
<br /><input type="hidden" name="cmd[' . $this->table . '][' . $this->uid . '][version][action]" value="new" />
<input type="hidden" name="prErr" value="1" />
<input type="hidden" name="redirect" value="' . htmlspecialchars($this->REQUEST_URI) . '" />
<input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('createNewVersion') . '" />
' . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction') . '
</form>
';
$this->content .= $this->doc->spacer(15);
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('createNewVersion'), $content, 0, 1);
}
示例15: getBulkSelector
/**
* Get the HTML data required for a bulk selection of files of the TYPO3 Element Browser.
*
* @param int $filesCount Number of files currently displayed
* @return string HTML data required for a bulk selection of files - if $filesCount is 0, nothing is returned
*/
public function getBulkSelector($filesCount)
{
if (!$filesCount) {
return '';
}
$lang = $this->getLanguageService();
$labelToggleSelection = $lang->sL('LLL:EXT:lang/locallang_browse_links.xlf:toggleSelection', TRUE);
$labelImportSelection = $lang->sL('LLL:EXT:lang/locallang_browse_links.xlf:importSelection', TRUE);
// Getting flag for showing/not showing thumbnails:
$noThumbsInEB = $this->getBackendUserAuthentication()->getTSConfigVal('options.noThumbsInEB');
$out = $this->doc->spacer(10) . '<div>' . '<a href="#" onclick="BrowseLinks.Selector.handle()">' . IconUtility::getSpriteIcon('actions-document-import-t3d', array('title' => $labelImportSelection)) . $labelImportSelection . '</a> ' . '<a href="#" onclick="BrowseLinks.Selector.toggle()">' . IconUtility::getSpriteIcon('actions-document-select', array('title' => $labelToggleSelection)) . $labelToggleSelection . '</a>' . '</div>';
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">' . $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;
}