TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
VersionModuleController.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Version\Controller;
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
17 use Psr\Http\Message\ResponseInterface;
18 use Psr\Http\Message\ServerRequestInterface;
28 
33 {
39  public $MCONF = [];
40 
46  public $MOD_MENU = [];
47 
53  public $MOD_SETTINGS = [];
54 
60  public $doc;
61 
65  public $content;
66 
72  public $showWorkspaceCol = 0;
73 
78 
82  public $formatCount_cache = [];
83 
87  public $targets = [];
88 
94  public $pageModule = '';
95 
101  public $publishAccess = false;
102 
106  public $stageIndex = [];
107 
111  public $recIndex = [];
112 
118  protected $moduleName = 'web_txversionM1';
119 
125  protected $moduleTemplate;
126 
130  public function __construct()
131  {
132  $GLOBALS['SOBE'] = $this;
133  $this->getLanguageService()->includeLLFile('EXT:version/Resources/Private/Language/locallang.xlf');
134  $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
135  }
136 
142  public function menuConfig()
143  {
144  // CLEANSE SETTINGS
145  $this->MOD_SETTINGS = BackendUtility::getModuleData($this->MOD_MENU, GeneralUtility::_GP('SET'), $this->moduleName, 'ses');
146  }
147 
153  public function main()
154  {
155  // Template markers
156  $markers = [
157  'CSH' => '',
158  'FUNC_MENU' => '',
159  'WS_MENU' => '',
160  'CONTENT' => ''
161  ];
162  // Setting module configuration:
163  $this->MCONF['name'] = $this->moduleName;
164  $this->REQUEST_URI = str_replace('&sendToReview=1', '', GeneralUtility::getIndpEnv('REQUEST_URI'));
165  // Draw the header.
166  $this->doc = GeneralUtility::makeInstance(\TYPO3\CMS\Backend\Template\DocumentTemplate::class);
167  $this->doc->setModuleTemplate('EXT:version/Resources/Private/Templates/version.html');
168 
169  // Setting up the context sensitive menu:
170  $this->getPageRenderer()->loadJquery();
171  $this->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/ClickMenu');
172  // Getting input data:
173  $this->id = (int)GeneralUtility::_GP('id');
174 
175  // Record uid. Goes with table name to indicate specific record
176  $this->uid = (int)GeneralUtility::_GP('uid');
177  // // Record table. Goes with uid to indicate specific record
178  $this->table = GeneralUtility::_GP('table');
179 
180  $this->details = GeneralUtility::_GP('details');
181  // Page id. If set, indicates activation from Web>Versioning module
182  $this->diffOnly = GeneralUtility::_GP('diffOnly');
183  // Flag. If set, shows only the offline version and with diff-view
184  // Force this setting:
185  $this->MOD_SETTINGS['expandSubElements'] = true;
186  $this->MOD_SETTINGS['diff'] = $this->details || $this->MOD_SETTINGS['diff'] ? 1 : 0;
187  // Reading the record:
188  $record = BackendUtility::getRecord($this->table, $this->uid);
189  if ($record['pid'] == -1) {
190  $record = BackendUtility::getRecord($this->table, $record['t3ver_oid']);
191  }
192  $this->recordFound = is_array($record);
193  $pidValue = $this->table === 'pages' ? $this->uid : $record['pid'];
194  // Checking access etc.
195  if ($this->recordFound && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS'] && !$this->id) {
196  $this->uid = $record['uid'];
197  // Might have changed if new live record was found!
198  // Access check!
199  // The page will show only if there is a valid page and if this page may be viewed by the user
200  $this->pageinfo = BackendUtility::readPageAccess($pidValue, $this->perms_clause);
201  $access = is_array($this->pageinfo) ? 1 : 0;
202  if ($pidValue && $access || $GLOBALS['BE_USER']->user['admin'] && !$pidValue) {
203  // If another page module was specified, replace the default Page module with the new one
204  $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
205  $this->pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
206  // Setting publish access permission for workspace:
207  $this->publishAccess = $GLOBALS['BE_USER']->workspacePublishAccess($GLOBALS['BE_USER']->workspace);
208  $this->versioningMgm();
209  }
210  // Setting up the buttons and markers for docheader
211  $docHeaderButtons = $this->getButtons();
212  $markers['CSH'] = $docHeaderButtons['csh'];
213  $markers['FUNC_MENU'] = BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function']);
214  $markers['CONTENT'] = $this->content;
215  } else {
216  // If no access or id value, create empty document
217  $this->content = '<h2>' . htmlspecialchars($this->getLanguageService()->getLL('clickAPage_header')) . '</h2><div>' . $this->getLanguageService()->getLL('clickAPage_content') . '</div>';
218  // Setting up the buttons and markers for docheader
219  $docHeaderButtons = $this->getButtons();
220  $markers['CONTENT'] = $this->content;
221  }
222  // Build the <body> for the module
223  $this->content = $this->doc->startPage($this->getLanguageService()->getLL('title'));
224  $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
225  $this->content .= $this->doc->endPage();
226  $this->content = $this->doc->insertStylesAndJS($this->content);
227  }
228 
234  protected function getButtons()
235  {
236  $buttons = [
237  'csh' => '',
238  'view' => '',
239  'record_list' => '',
240  'shortcut' => ''
241  ];
242  // CSH
243  if ($this->recordFound && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS']) {
244  // View page
245  $buttons['view'] = '
246  <a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->pageinfo['uid'], '', BackendUtility::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showPage')) . '">
247  ' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '
248  </a>';
249  // Shortcut
250  if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
251  $buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->moduleName);
252  }
253  // If access to Web>List for user, then link to that module.
254  $buttons['record_list'] = '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl(
255  'web_list',
256  [
257  'id' => $this->pageinfo['uid'],
258  'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
259  ]
260  )) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render() . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.showList')) . '</a>';
261  }
262  return $buttons;
263  }
264 
265  /******************************
266  *
267  * Versioning management
268  *
269  ******************************/
275  public function versioningMgm()
276  {
277  $lang = $this->getLanguageService();
278  // Diffing:
279  $diff_1 = GeneralUtility::_POST('diff_1');
280  $diff_2 = GeneralUtility::_POST('diff_2');
281  if (GeneralUtility::_POST('do_diff')) {
282  $content = '';
283  $content .= '<div class="panel panel-space panel-default">';
284  $content .= '<div class="panel-heading">' . $lang->getLL('diffing') . '</div>';
285  if ($diff_1 && $diff_2) {
286  $diff_1_record = BackendUtility::getRecord($this->table, $diff_1);
287  $diff_2_record = BackendUtility::getRecord($this->table, $diff_2);
288  if (is_array($diff_1_record) && is_array($diff_2_record)) {
289  $diffUtility = GeneralUtility::makeInstance(DiffUtility::class);
290  $rows = [];
291  $rows[] = '
292  <tr>
293  <th>' . $lang->getLL('fieldname') . '</th>
294  <th width="98%">' . $lang->getLL('coloredDiffView') . ':</th>
295  </tr>
296  ';
297  foreach ($diff_1_record as $fN => $fV) {
298  if ($GLOBALS['TCA'][$this->table]['columns'][$fN] && $GLOBALS['TCA'][$this->table]['columns'][$fN]['config']['type'] !== 'passthrough' && $fN !== 't3ver_label') {
299  if ((string)$diff_1_record[$fN] !== (string)$diff_2_record[$fN]) {
300  $diffres = $diffUtility->makeDiffDisplay(
301  BackendUtility::getProcessedValue($this->table, $fN, $diff_2_record[$fN], 0, 1),
302  BackendUtility::getProcessedValue($this->table, $fN, $diff_1_record[$fN], 0, 1)
303  );
304  $rows[] = '
305  <tr>
306  <td>' . $fN . '</td>
307  <td width="98%">' . $diffres . '</td>
308  </tr>
309  ';
310  }
311  }
312  }
313  if (count($rows) > 1) {
314  $content .= '<div class="table-fit"><table class="table">' . implode('', $rows) . '</table></div>';
315  } else {
316  $content .= '<div class="panel-body">' . $lang->getLL('recordsMatchesCompletely') . '</div>';
317  }
318  } else {
319  $content .= '<div class="panel-body">' . $lang->getLL('errorRecordsNotFound') . '</div>';
320  }
321  } else {
322  $content .= '<div class="panel-body">' . $lang->getLL('errorDiffSources') . '</div>';
323  }
324  $content .= '</div>';
325  }
326  // Element:
327  $record = BackendUtility::getRecord($this->table, $this->uid);
328  $recTitle = BackendUtility::getRecordTitle($this->table, $record, true);
329  // Display versions:
330  $content .= '
331  <form name="theform" action="' . str_replace('&sendToReview=1', '', $this->REQUEST_URI) . '" method="post">
332  <div class="panel panel-space panel-default">
333  <div class="panel-heading">' . $recTitle . '</div>
334  <div class="table-fit">
335  <table class="table">
336  <thead>
337  <tr>
338  <th colspan="2" class="col-icon"></th>
339  <th title="' . $lang->getLL('tblHeaderDesc_title') . '">' . $lang->getLL('tblHeader_title') . '</th>
340  <th title="' . $lang->getLL('tblHeaderDesc_uid') . '"><i>' . $lang->getLL('tblHeader_uid') . '</i></th>
341  <th title="' . $lang->getLL('tblHeaderDesc_t3ver_oid') . '"><i>' . $lang->getLL('tblHeader_t3ver_oid') . '</i></th>
342  <th title="' . $lang->getLL('tblHeaderDesc_t3ver_id') . '"><i>' . $lang->getLL('tblHeader_t3ver_id') . '</i></th>
343  <th title="' . $lang->getLL('tblHeaderDesc_t3ver_wsid') . '"><i>' . $lang->getLL('tblHeader_t3ver_wsid') . '</i></th>
344  <th title="' . htmlspecialchars($lang->getLL('tblHeaderDesc_t3ver_state')) . '"><i>' . $lang->getLL('tblHeader_t3ver_state') . '</i></th>
345  <th title="' . $lang->getLL('tblHeaderDesc_t3ver_stage') . '"><i>' . $lang->getLL('tblHeader_t3ver_stage') . '</i></th>
346  <th title="' . $lang->getLL('tblHeaderDesc_t3ver_count') . '"><i>' . $lang->getLL('tblHeader_t3ver_count') . '</i></th>
347  <th title="' . $lang->getLL('tblHeaderDesc_pid') . '"><i>' . $lang->getLL('tblHeader_pid') . '</i></th>
348  <th title="' . $lang->getLL('tblHeaderDesc_t3ver_label') . '"><i>' . $lang->getLL('tblHeader_t3ver_label') . '</i></th>
349  <th></th>
350  <th colspan="2">
351  <button class="btn btn-default btn-sm" type="submit" name="do_diff" value="true">
352  ' . $lang->getLL('diff') . '
353  </button>
354  </th>
355  </tr>
356  </thead>
357  <tbody>
358  ';
359  $versions = BackendUtility::selectVersionsOfRecord($this->table, $this->uid, '*', $GLOBALS['BE_USER']->workspace);
360  foreach ($versions as $row) {
361  $adminLinks = $this->adminLinks($this->table, $row);
362 
363  $editUrl = BackendUtility::getModuleUrl('record_edit', [
364  'edit' => [
365  $this->table => [
366  $row['uid'] => 'edit'
367  ]
368  ],
369  'columnsOnly' => 't3ver_label',
370  'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
371  ]);
372  $content .= '
373  <tr' . ($row['uid'] != $this->uid ? '' : ' class="active"') . '>
374  <td class="col-icon">' .
375  ($row['uid'] != $this->uid ?
376  '<a href="' . BackendUtility::getLinkToDataHandlerAction('&cmd[' . $this->table . '][' . $this->uid . '][version][swapWith]=' . $row['uid'] . '&cmd[' . $this->table . '][' . $this->uid . '][version][action]=swap') . '" title="' . htmlspecialchars($lang->getLL('swapWithCurrent')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-version-swap-version', Icon::SIZE_SMALL)->render() . '</a>' :
377  '<span title="' . htmlspecialchars($lang->getLL('currentOnlineVersion')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('status-status-current', Icon::SIZE_SMALL)->render() . '</span>'
378  ) . '
379  </td>
380  <td class="col-icon">' . $this->moduleTemplate->getIconFactory()->getIconForRecord($this->table, $row, Icon::SIZE_SMALL)->render() . '</td>
381  <td>' . BackendUtility::getRecordTitle($this->table, $row, true) . '</td>
382  <td>' . $row['uid'] . '</td>
383  <td>' . $row['t3ver_oid'] . '</td>
384  <td>' . $row['t3ver_id'] . '</td>
385  <td>' . $row['t3ver_wsid'] . '</td>
386  <td>' . $row['t3ver_state'] . '</td>
387  <td>' . $row['t3ver_stage'] . '</td>
388  <td>' . $row['t3ver_count'] . '</td>
389  <td>' . $row['pid'] . '</td>
390  <td>
391  <a href="' . htmlspecialchars($editUrl) . '" title="' . htmlspecialchars($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.edit')) . '">
392  ' . $this->moduleTemplate->getIconFactory()->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '
393  </a>' . htmlspecialchars($row['t3ver_label']) . '
394  </td>
395  <td class="col-control">' . $adminLinks . '</td>
396  <td class="text-center success"><input type="radio" name="diff_1" value="' . $row['uid'] . '"' . ($diff_1 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
397  <td class="text-center danger"><input type="radio" name="diff_2" value="' . $row['uid'] . '"' . ($diff_2 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
398  </tr>';
399  // 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;)
400  if ($this->table === 'pages' && $row['uid'] != $this->uid) {
401  $sub = $this->pageSubContent($row['uid']);
402  if ($sub) {
403  $content .= '
404  <tr>
405  <td colspan="2"></td>
406  <td colspan="11">' . $sub . '</td>
407  <td class="success"></td>
408  <td class="danger"></td>
409  </tr>';
410  }
411  }
412  }
413  $content .= '
414  </tbody>
415  </table>
416  </div>
417  </div>
418  </form>';
419  $this->content .= '<h2>' . htmlspecialchars($lang->getLL('title')) . '</h2><div>' . $content . '</div>';
420  // Create new:
421  $content = '
422  <form action="' . htmlspecialchars(BackendUtility::getModuleUrl('tce_db')) . '" method="post">
423  <div class="row">
424  <div class="col-sm-6 col-md-4 col-lg-3">
425  <div class="form-group">
426  <label for="typo3-new-version-label">' . $lang->getLL('tblHeader_t3ver_label') . '</label>
427  <input id="typo3-new-version-label" class="form-control" type="text" name="cmd[' . $this->table . '][' . $this->uid . '][version][label]" />
428  </div>
429  <div class="form-group">
430  <input type="hidden" name="cmd[' . $this->table . '][' . $this->uid . '][version][action]" value="new" />
431  <input type="hidden" name="prErr" value="1" />
432  <input type="hidden" name="redirect" value="' . htmlspecialchars($this->REQUEST_URI) . '" />
433  <input class="btn btn-default" type="submit" name="_" value="' . $lang->getLL('createNewVersion') . '" />
434  </div>
435  </div>
436  </div>
437  </form>
438 
439  ';
440  $this->content .= '<h2>' . htmlspecialchars($lang->getLL('createNewVersion')) . '</h2><div>' . $content . '</div>';
441  }
442 
450  public function pageSubContent($pid, $c = 0)
451  {
452  $tableNames = ArrayUtility::removeArrayEntryByValue(array_keys($GLOBALS['TCA']), 'pages');
453  $tableNames[] = 'pages';
454  $content = '';
455  foreach ($tableNames as $table) {
456  // Basically list ALL tables - not only those being copied might be found!
457  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
458  ->getQueryBuilderForTable($table);
459  $queryBuilder->getRestrictions()
460  ->removeAll()
461  ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
462 
463  $queryBuilder
464  ->select('*')
465  ->from($table)
466  ->where(
467  $queryBuilder->expr()->eq(
468  'pid',
469  $queryBuilder->createNamedParameter($pid, \PDO::PARAM_INT)
470  )
471  );
472 
473  if (!empty($GLOBALS['TCA'][$table]['ctrl']['sortby'])) {
474  $queryBuilder->orderBy($GLOBALS['TCA'][$table]['ctrl']['sortby']);
475  }
476 
477  $result = $queryBuilder->execute();
478  if ($result->rowCount()) {
479  $content .= '
480  <table class="table">
481  <tr>
482  <th class="col-icon">' . $this->moduleTemplate->getIconFactory()->getIconForRecord($table, [], Icon::SIZE_SMALL)->render() . '</th>
483  <th class="col-title">' . htmlspecialchars($this->getLanguageService()->sL($GLOBALS['TCA'][$table]['ctrl']['title'])) . '</th>
484  <th></th>
485  <th></th>
486  </tr>';
487  while ($subrow = $result->fetch()) {
488  $ownVer = $this->lookForOwnVersions($table, $subrow['uid']);
489  $content .= '
490  <tr>
491  <td class="col-icon">' . $this->moduleTemplate->getIconFactory()->getIconForRecord($table, $subrow, Icon::SIZE_SMALL)->render() . '</td>
492  <td class="col-title">' . BackendUtility::getRecordTitle($table, $subrow, true) . '</td>
493  <td>' . ($ownVer > 1 ? '<a href="' . htmlspecialchars(BackendUtility::getModuleUrl('web_txversionM1', ['table' => $table, 'uid' => $subrow['uid']])) . '">' . ($ownVer - 1) . '</a>' : '') . '</td>
494  <td class="col-control">' . $this->adminLinks($table, $subrow) . '</td>
495  </tr>';
496  if ($table == 'pages' && $c < 100) {
497  $sub = $this->pageSubContent($subrow['uid'], $c + 1);
498  if ($sub) {
499  $content .= '
500  <tr>
501  <td></td>
502  <td></td>
503  <td></td>
504  <td width="98%">' . $sub . '</td>
505  </tr>';
506  }
507  }
508  }
509  $content .= '</table>';
510  }
511  }
512  return $content;
513  }
514 
522  public function lookForOwnVersions($table, $uid)
523  {
524  $versions = BackendUtility::selectVersionsOfRecord($table, $uid, 'uid', null);
525  if (is_array($versions)) {
526  return count($versions);
527  }
528  return false;
529  }
530 
538  public function adminLinks($table, $row)
539  {
540  // Edit link:
541  $editUrl = BackendUtility::getModuleUrl('record_edit', [
542  'edit' => [
543  $table => [
544  $row['uid'] => 'edit'
545  ]
546  ],
547  'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
548  ]);
549  $adminLink = '<div class="btn-group btn-group-sm" role="group">';
550  $adminLink .= '<a class="btn btn-default" href="' . htmlspecialchars($editUrl) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.edit')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-open', Icon::SIZE_SMALL)->render() . '</a>';
551  // Delete link:
552  $adminLink .= '<a class="btn btn-default" href="' . htmlspecialchars(BackendUtility::getLinkToDataHandlerAction('&cmd[' . $table . '][' . $row['uid'] . '][delete]=1')) . '" title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:cm.delete')) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-edit-delete', Icon::SIZE_SMALL)->render() . '</a>';
553  $adminLink .= '</div>';
554  if ($table === 'pages') {
555  // If another page module was specified, replace the default Page module with the new one
556  $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
557  $pageModule = BackendUtility::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
558  $adminLink .= '<div class="btn-group btn-group-sm">';
559  $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(' . GeneralUtility::quoteJSvalue($pageModule) . '); return false;">'
560  . $this->moduleTemplate->getIconFactory()->getIcon('actions-page-open', Icon::SIZE_SMALL)->render()
561  . '</a>';
562  $adminLink .= '<a class="btn btn-default" href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'web_list\'); return false;">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-system-list-open', Icon::SIZE_SMALL)->render() . '</a>';
563  // "View page" icon is added:
564  $adminLink .= '<a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['uid'], '', BackendUtility::BEgetRootLine($row['uid']))) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a>';
565  $adminLink .= '</div>';
566  } else {
567  if ($row['pid'] == -1) {
568  $getVars = '&ADMCMD_vPrev[' . rawurlencode(($table . ':' . $row['t3ver_oid'])) . ']=' . $row['uid'];
569  // "View page" icon is added:
570  $adminLink .= '<div class="btn-group btn-group-sm" role="group"><a class="btn btn-default" href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($row['_REAL_PID'], '', BackendUtility::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . $this->moduleTemplate->getIconFactory()->getIcon('actions-document-view', Icon::SIZE_SMALL)->render() . '</a></div>';
571  }
572  }
573  return $adminLink;
574  }
575 
583  public function mainAction(ServerRequestInterface $request, ResponseInterface $response)
584  {
585  $this->init();
586  $this->main();
587 
588  $response->getBody()->write($this->content);
589  return $response;
590  }
591 
595  protected function getLanguageService()
596  {
597  return $GLOBALS['LANG'];
598  }
599 }
static getRecordTitle($table, $row, $prep=false, $forceResult=true)
static getLinkToDataHandlerAction($parameters, $redirectUrl= '')
static getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type= '', $dontValidateList= '', $setDefaultList= '')
static viewOnClick($pageUid, $backPath= '', $rootLine=null, $anchorSection= '', $alternativeUrl= '', $additionalGetVars= '', $switchFocus=true)
mainAction(ServerRequestInterface $request, ResponseInterface $response)
static getFuncMenu($mainParams, $elementName, $currentValue, $menuItems, $script= '', $addParams= '')
static selectVersionsOfRecord($table, $uid, $fields= '*', $workspace=0, $includeDeletedRecords=false, $row=null)
static BEgetRootLine($uid, $clause= '', $workspaceOL=false)
static getRecord($table, $uid, $fields= '*', $where= '', $useDeleteClause=true)
if(TYPO3_MODE=== 'BE') $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController']['default']
static makeInstance($className,...$constructorArguments)
static removeArrayEntryByValue(array $array, $cmpValue)