本文整理汇总了PHP中TYPO3\CMS\Backend\Template\DocumentTemplate::divider方法的典型用法代码示例。如果您正苦于以下问题:PHP DocumentTemplate::divider方法的具体用法?PHP DocumentTemplate::divider怎么用?PHP DocumentTemplate::divider使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\CMS\Backend\Template\DocumentTemplate
的用法示例。
在下文中一共展示了DocumentTemplate::divider方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderFileInfo
/**
* Main function. Will generate the information to display for the item
* set internally.
*
* @param string $returnLinkTag <a> tag closing/returning.
* @return void
* @todo Define visibility
*/
public function renderFileInfo($returnLinkTag)
{
$fileExtension = $this->fileObject->getExtension();
$code = '<div class="fileInfoContainer">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForFile($fileExtension) . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.file', TRUE) . ':</strong> ' . $this->fileObject->getName() . ' ' . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.filesize') . ':</strong> ' . \TYPO3\CMS\Core\Utility\GeneralUtility::formatSize($this->fileObject->getSize()) . '</div>
';
$this->content .= $this->doc->section('', $code);
$this->content .= $this->doc->divider(2);
// If the file was an image...
// @todo: add this check in the domain model, or in the processing folder
if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], $fileExtension)) {
// @todo: find a way to make getimagesize part of the t3lib_file object
$imgInfo = @getimagesize($this->fileObject->getForLocalProcessing(FALSE));
$thumbUrl = $this->fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, array('width' => '150m', 'height' => '150m'))->getPublicUrl(TRUE);
$code = '<div class="fileInfoContainer fileDimensions">' . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.dimensions') . ':</strong> ' . $imgInfo[0] . 'x' . $imgInfo[1] . ' ' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.pixels') . '</div>';
$code .= '<br />
<div align="center">' . $returnLinkTag . '<img src="' . $thumbUrl . '" alt="' . htmlspecialchars(trim($this->fileObject->getName())) . '" title="' . htmlspecialchars(trim($this->fileObject->getName())) . '" /></a></div>';
$this->content .= $this->doc->section('', $code);
} elseif ($fileExtension == 'ttf') {
$thumbUrl = $this->fileObject->process(\TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, array('width' => '530m', 'height' => '600m'))->getPublicUrl(TRUE);
$thumb = '<br />
<div align="center">' . $returnLinkTag . '<img src="' . $thumbUrl . '" border="0" title="' . htmlspecialchars(trim($this->fileObject->getName())) . '" alt="" /></a></div>';
$this->content .= $this->doc->section('', $thumb);
}
// Traverse the list of fields to display for the record:
$tableRows = array();
$showRecordFieldList = $GLOBALS['TCA'][$this->table]['interface']['showRecordFieldList'];
$fieldList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $showRecordFieldList, TRUE);
foreach ($fieldList as $name) {
$name = trim($name);
if (!isset($GLOBALS['TCA'][$this->table]['columns'][$name])) {
continue;
}
$isExcluded = !(!$GLOBALS['TCA'][$this->table]['columns'][$name]['exclude'] || $GLOBALS['BE_USER']->check('non_exclude_fields', $this->table . ':' . $name));
if ($isExcluded) {
continue;
}
$uid = $this->row['uid'];
$itemValue = \TYPO3\CMS\Backend\Utility\BackendUtility::getProcessedValue($this->table, $name, $this->row[$name], 0, 0, FALSE, $uid);
$itemLabel = $GLOBALS['LANG']->sL(\TYPO3\CMS\Backend\Utility\BackendUtility::getItemLabel($this->table, $name), 1);
$tableRows[] = '
<tr>
<td class="t3-col-header">' . $itemLabel . '</td>
<td>' . htmlspecialchars($itemValue) . '</td>
</tr>';
}
// Create table from the information:
$tableCode = '
<table border="0" cellpadding="0" cellspacing="0" id="typo3-showitem" class="t3-table-info">
' . implode('', $tableRows) . '
</table>';
$this->content .= $this->doc->section('', $tableCode);
// References:
if ($this->fileObject->isIndexed()) {
$header = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:show_item.php.referencesToThisItem');
$this->content .= $this->doc->section($header, $this->makeRef('_FILE', $this->fileObject));
}
}
示例2: 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);
}
示例3: 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);
}
}
示例4: doEdit
/**
* Creating form for editing the permissions ($this->edit = TRUE)
* (Adding content to internal content variable)
*
* @return void
*/
public function doEdit()
{
if ($GLOBALS['BE_USER']->workspace != 0) {
// Adding section with the permission setting matrix:
$lockedMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('WorkspaceWarningText'), $GLOBALS['LANG']->getLL('WorkspaceWarning'), \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING);
\TYPO3\CMS\Core\Messaging\FlashMessageQueue::addMessage($lockedMessage);
}
// Get usernames and groupnames
$beGroupArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getListGroupNames('title,uid');
$beGroupKeys = array_keys($beGroupArray);
$beUserArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getUserNames();
if (!$GLOBALS['BE_USER']->isAdmin()) {
$beUserArray = \TYPO3\CMS\Backend\Utility\BackendUtility::blindUserNames($beUserArray, $beGroupKeys, 1);
}
$beGroupArray_o = $beGroupArray = \TYPO3\CMS\Backend\Utility\BackendUtility::getGroupNames();
if (!$GLOBALS['BE_USER']->isAdmin()) {
$beGroupArray = \TYPO3\CMS\Backend\Utility\BackendUtility::blindGroupNames($beGroupArray_o, $beGroupKeys, 1);
}
// data of the first group, the user is member of
$firstGroup = $beGroupKeys[0] ? $beGroupArray[$beGroupKeys[0]] : '';
// Owner selector:
$options = '';
// flag: is set if the page-userid equals one from the user-list
$userset = 0;
foreach ($beUserArray as $uid => $row) {
if ($uid == $this->pageinfo['perms_userid']) {
$userset = 1;
$selected = ' selected="selected"';
} else {
$selected = '';
}
$options .= '
<option value="' . $uid . '"' . $selected . '>' . htmlspecialchars($row['username']) . '</option>';
}
$options = '
<option value="0"></option>' . $options;
$selector = '
<select name="data[pages][' . $this->id . '][perms_userid]">
' . $options . '
</select>';
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('Owner') . ':', $selector);
// Group selector:
$options = '';
$userset = 0;
foreach ($beGroupArray as $uid => $row) {
if ($uid == $this->pageinfo['perms_groupid']) {
$userset = 1;
$selected = ' selected="selected"';
} else {
$selected = '';
}
$options .= '
<option value="' . $uid . '"' . $selected . '>' . htmlspecialchars($row['title']) . '</option>';
}
// If the group was not set AND there is a group for the page
if (!$userset && $this->pageinfo['perms_groupid']) {
$options = '
<option value="' . $this->pageinfo['perms_groupid'] . '" selected="selected">' . htmlspecialchars($beGroupArray_o[$this->pageinfo['perms_groupid']]['title']) . '</option>' . $options;
}
$options = '
<option value="0"></option>' . $options;
$selector = '
<select name="data[pages][' . $this->id . '][perms_groupid]">
' . $options . '
</select>';
$this->content .= $this->doc->divider(5);
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('Group') . ':', $selector);
// Permissions checkbox matrix:
$code = '
<table border="0" cellspacing="2" cellpadding="0" id="typo3-permissionMatrix">
<tr>
<td></td>
<td class="bgColor2">' . str_replace(' ', '<br />', $GLOBALS['LANG']->getLL('1', 1)) . '</td>
<td class="bgColor2">' . str_replace(' ', '<br />', $GLOBALS['LANG']->getLL('16', 1)) . '</td>
<td class="bgColor2">' . str_replace(' ', '<br />', $GLOBALS['LANG']->getLL('2', 1)) . '</td>
<td class="bgColor2">' . str_replace(' ', '<br />', $GLOBALS['LANG']->getLL('4', 1)) . '</td>
<td class="bgColor2">' . str_replace(' ', '<br />', $GLOBALS['LANG']->getLL('8', 1)) . '</td>
</tr>
<tr>
<td align="right" class="bgColor2">' . $GLOBALS['LANG']->getLL('Owner', 1) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_user', 1) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_user', 5) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_user', 2) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_user', 3) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_user', 4) . '</td>
</tr>
<tr>
<td align="right" class="bgColor2">' . $GLOBALS['LANG']->getLL('Group', 1) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_group', 1) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_group', 5) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_group', 2) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_group', 3) . '</td>
<td class="bgColor-20">' . $this->printCheckBox('perms_group', 4) . '</td>
</tr>
//.........这里部分代码省略.........
示例5: main
/**
* Main function, rendering the main module content
*
* @return void
*/
public function main()
{
// Start content compilation
$this->content .= $this->doc->startPage($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.pagetitle'));
// Make page header:
$pageContent = $this->doc->header($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.pagetitle'));
$pageContent .= $this->doc->spacer(5);
$pageContent .= $this->doc->divider(5);
if ($this->folderObject->checkActionPermission('add')) {
$code = '<form action="tce_file.php" method="post" name="editform">';
// Making the selector box for the number of concurrent folder-creations
$this->number = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->number, 1, 10);
$code .= '
<div id="c-select">
<label for="number-of-new-folders">' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.number_of_folders') . '</label>
<select name="number" id="number-of-new-folders" onchange="reload(this.options[this.selectedIndex].value);">';
for ($a = 1; $a <= $this->folderNumber; $a++) {
$code .= '<option value="' . $a . '"' . ($this->number == $a ? ' selected="selected"' : '') . '>' . $a . '</option>';
}
$code .= '
</select>
</div>
';
// Making the number of new-folder boxes needed:
$code .= '
<div id="c-createFolders">
';
for ($a = 0; $a < $this->number; $a++) {
$code .= '
<input' . $this->doc->formWidth(20) . ' type="text" name="file[newfolder][' . $a . '][data]" onchange="changed=true;" />
<input type="hidden" name="file[newfolder][' . $a . '][target]" value="' . htmlspecialchars($this->target) . '" /><br />
';
}
$code .= '
</div>
';
// Making submit button for folder creation:
$code .= '
<div id="c-submitFolders">
<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.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>
';
// CSH:
$code .= BackendUtility::cshItem('xMOD_csh_corebe', 'file_newfolder', $GLOBALS['BACK_PATH'], '<br />');
$pageContent .= $code;
// Add spacer:
$pageContent .= $this->doc->spacer(10);
// Switching form tags:
$pageContent .= $this->doc->sectionEnd() . '</form>';
}
if ($this->folderObject->getStorage()->checkUserActionPermission('add', 'File')) {
$pageContent .= '<form action="tce_file.php" method="post" name="editform2">';
// Create a list of allowed file extensions with the nice format "*.jpg, *.gif" etc.
$fileExtList = array();
$textfileExt = GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'], TRUE);
foreach ($textfileExt as $fileExt) {
if (!preg_match('/' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'] . '/i', '.' . $fileExt)) {
$fileExtList[] = '*.' . $fileExt;
}
}
// Add form fields for creation of a new, blank text file:
$code = '
<div id="c-newFile">
<p>[' . htmlspecialchars(implode(', ', $fileExtList)) . ']</p>
<input' . $this->doc->formWidth(20) . ' type="text" name="file[newfile][0][data]" onchange="changed=true;" />
<input type="hidden" name="file[newfile][0][target]" value="' . htmlspecialchars($this->target) . '" />
</div>
';
// Submit button for creation of a new file:
$code .= '
<div id="c-submitFiles">
<input type="submit" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.newfile_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>
';
// CSH:
$code .= BackendUtility::cshItem('xMOD_csh_corebe', 'file_newfile', $GLOBALS['BACK_PATH'], '<br />');
$pageContent .= $this->doc->section($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.newfile'), $code);
$pageContent .= $this->doc->sectionEnd();
$pageContent .= '</form>';
}
$docHeaderButtons = array('back' => '');
// Back
if ($this->returnUrl) {
$docHeaderButtons['back'] = '<a href="' . htmlspecialchars(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();
//.........这里部分代码省略.........