89 $GLOBALS[
'LANG']->includeLLFile(
'EXT:lang/locallang_misc.xlf');
107 $this->moveUid = $this->input_moveUid ? $this->input_moveUid :
$this->page_id;
110 $this->perms_clause =
$GLOBALS[
'BE_USER']->getPagePermsClause(1);
113 $this->doc->backPath =
$GLOBALS[
'BACK_PATH'];
114 $this->doc->setModuleTemplate(
'EXT:backend/Resources/Private/Templates/move_el.html');
115 $this->doc->JScode =
'';
118 $this->content .= $this->doc->header(
$GLOBALS[
'LANG']->getLL(
'movingElement'));
128 if ($this->page_id) {
135 $hline .= $this->doc->spacer(5);
137 $hline .= $this->doc->spacer(5); 138 $hline .= '<input type=
"hidden" name=
"makeCopy" value=
"0" />
' . '<input type=
"checkbox" name=
"makeCopy" id=
"makeCopy" value=
"1"' . ($this->makeCopy ? ' checked=
"checked"' : '') . ' onclick=
"' . htmlspecialchars($onClick) . '" /> <label
for=
"makeCopy" class=
"t3-label-valign-top">
' . $GLOBALS['LANG
']->getLL('makeCopy
', 1) . '</label>
'; 139 // Add the header-content to the module content: 140 $this->content .= $this->doc->section('', $hline, FALSE, TRUE); 141 $this->content .= $this->doc->spacer(20); 142 // Reset variable to pick up the module content in: 144 // IF the table is "pages": 145 if ((string) $this->table == 'pages
') { 146 // Get page record (if accessible): 147 $pageinfo = BackendUtility::readPageAccess($this->page_id, $this->perms_clause); 148 if (is_array($pageinfo) && $GLOBALS['BE_USER
']->isInWebMount($pageinfo['pid
'], $this->perms_clause)) { 149 // Initialize the position map: 151 $posMap->moveOrCopy = $this->makeCopy ? 'copy
' : 'move
'; 152 // Print a "go-up" link IF there is a real parent page (and if the user has read-access to that page). 153 if ($pageinfo['pid
']) { 154 $pidPageInfo = BackendUtility::readPageAccess($pageinfo['pid
'], $this->perms_clause); 155 if (is_array($pidPageInfo)) { 156 if ($GLOBALS['BE_USER
']->isInWebMount($pidPageInfo['pid
'], $this->perms_clause)) { 157 $code .= '<a href=
"' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => (int)$pageinfo['pid'], 'moveUid' => $this->moveUid))) . '">
' . IconUtility::getSpriteIcon('actions-view-go-up
') . BackendUtility::getRecordTitle('pages
', $pidPageInfo, TRUE) . '</a><br />
'; 159 $code .= IconUtility::getSpriteIconForRecord('pages
', $pidPageInfo) . BackendUtility::getRecordTitle('pages
', $pidPageInfo, TRUE) . '<br />
'; 163 // Create the position tree: 164 $code .= $posMap->positionTree($this->page_id, $pageinfo, $this->perms_clause, $this->R_URI); 167 // IF the table is "tt_content": 168 if ((string) $this->table == 'tt_content
') { 169 // First, get the record: 170 $tt_content_rec = BackendUtility::getRecord('tt_content
', $this->moveUid); 172 if (!$this->input_moveUid) { 173 $this->page_id = $tt_content_rec['pid
']; 175 // Checking if the parent page is readable: 176 $pageinfo = BackendUtility::readPageAccess($this->page_id, $this->perms_clause); 177 if (is_array($pageinfo) && $GLOBALS['BE_USER
']->isInWebMount($pageinfo['pid
'], $this->perms_clause)) { 178 // Initialize the position map: 180 $posMap->moveOrCopy = $this->makeCopy ? 'copy
' : 'move
'; 181 $posMap->cur_sys_language = $this->sys_language; 182 // Headerline for the parent page: Icon, record title: 183 $hline = IconUtility::getSpriteIconForRecord('pages
', $pageinfo, array('title
' => htmlspecialchars(BackendUtility::getRecordIconAltText($pageinfo, 'pages
')))); 184 $hline .= BackendUtility::getRecordTitle('pages
', $pageinfo, TRUE); 185 // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable: 186 // SHARED page-TSconfig settings. 187 $modTSconfig_SHARED = BackendUtility::getModTSconfig($this->page_id, 'mod.SHARED
'); 188 $colPosArray = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getColPosListItemsParsed
', $this->page_id, $this); 189 $colPosIds = array(); 190 foreach ($colPosArray as $colPos) { 191 $colPosIds[] = $colPos[1]; 193 // Removing duplicates, if any 194 $colPosList = implode(',
', array_unique($colPosIds)); 195 // Adding parent page-header and the content element columns from position-map: 196 $code = $hline . '<br />
'; 197 $code .= $posMap->printContentElementColumns($this->page_id, $this->moveUid, $colPosList, 1, $this->R_URI); 198 // Print a "go-up" link IF there is a real parent page (and if the user has read-access to that page). 199 $code .= '<br /><br />
'; 200 if ($pageinfo['pid
']) { 201 $pidPageInfo = BackendUtility::readPageAccess($pageinfo['pid
'], $this->perms_clause); 202 if (is_array($pidPageInfo)) { 203 if ($GLOBALS['BE_USER
']->isInWebMount($pidPageInfo['pid
'], $this->perms_clause)) { 204 $code .= '<a href=
"' . htmlspecialchars(GeneralUtility::linkThisScript(array( 205 'uid' => (int)$pageinfo['pid'], 206 'moveUid' => $this->moveUid 207 ))) . '">
' . IconUtility::getSpriteIcon('actions-view-go-up
') . BackendUtility::getRecordTitle('pages
', $pidPageInfo, TRUE) . '</a><br />
'; 209 $code .= IconUtility::getSpriteIconForRecord('pages
', $pidPageInfo) . BackendUtility::getRecordTitle('pages
', $pidPageInfo, TRUE) . '<br />
'; 213 // Create the position tree (for pages): 214 $code .= $posMap->positionTree($this->page_id, $pageinfo, $this->perms_clause, $this->R_URI); 217 // Add the $code content as a new section to the module: 218 $this->content .= $this->doc->section($GLOBALS['LANG
']->getLL('selectPositionOfElement
'), $code, FALSE, TRUE); 220 // Setting up the buttons and markers for docheader 221 $docHeaderButtons = $this->getButtons(); 222 $markers['CSH
'] = $docHeaderButtons['csh
']; 223 $markers['CONTENT
'] = $this->content; 224 // Build the <body> for the module 225 $this->content = $this->doc->startPage($GLOBALS['LANG
']->getLL('movingElement
')); 226 $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers); 227 $this->content .= $this->doc->endPage(); 228 $this->content = $this->doc->insertStylesAndJS($this->content); 237 public function printContent() { 246 protected function getButtons() { 251 if ($this->page_id) { 252 if ((string) $this->table == 'pages
') { 253 $buttons['csh
'] = BackendUtility::cshItem('xMOD_csh_corebe
', 'move_el_pages
', $GLOBALS['BACK_PATH
'], '', TRUE); 254 } elseif ((string) $this->table == 'tt_content
') { 255 $buttons['csh
'] = BackendUtility::cshItem('xMOD_csh_corebe
', 'move_el_cs
', $GLOBALS['BACK_PATH
'], '', TRUE); 258 $buttons['back
'] = '<a href=
"' . htmlspecialchars($this->R_URI) . '" class=
"typo3-goBack" title=
"' . $GLOBALS['LANG']->getLL('goBack', TRUE) . '">
' . IconUtility::getSpriteIcon('actions-view-go-back
') . '</a>
';
static getRecordWSOL($table, $uid, $fields=' *', $where='', $useDeleteClause=TRUE, $unsetMovePointers=FALSE)
static makeInstance($className)
static getRecordTitle($table, $row, $prep=FALSE, $forceResult=TRUE)
static getSpriteIconForRecord($table, array $row, array $options=array())
static linkThisScript(array $getParams=array())
static getRecordIconAltText($row, $table='pages')
static sanitizeLocalUrl($url='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]