‪TYPO3CMS  10.4
PageLayoutController.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Psr\Http\Message\ResponseInterface;
21 use Psr\Http\Message\ServerRequestInterface;
48 
53 {
60  public ‪$id;
61 
67  protected ‪$modTSconfig = [];
68 
74  protected ‪$modSharedTSconfig = [];
75 
82  public ‪$pageinfo;
83 
89  protected ‪$colPosList;
90 
97 
103  protected ‪$MOD_MENU = [];
104 
111  public ‪$MOD_SETTINGS = [];
112 
119  protected ‪$activeColPosList;
120 
124  protected ‪$iconFactory;
125 
131  protected ‪$moduleName = 'web_layout';
132 
137 
141  protected ‪$buttonBar;
142 
146  protected ‪$searchContent;
147 
151  protected ‪$availableLanguages;
152 
156  protected ‪$pageRenderer;
157 
161  protected ‪$uriBuilder;
162 
166  protected ‪$context;
167 
175  public function ‪mainAction(ServerRequestInterface $request): ResponseInterface
176  {
177  ‪$GLOBALS['SOBE'] = $this;
178  $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
179  $this->pageRenderer = $this->moduleTemplate->getPageRenderer();
180  $this->iconFactory = $this->moduleTemplate->getIconFactory();
181  $this->uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
182  $this->buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
183  $this->‪getLanguageService()->‪includeLLFile('EXT:backend/Resources/Private/Language/locallang_layout.xlf');
184  // Setting module configuration / page select clause
185  $this->id = (int)($request->getParsedBody()['id'] ?? $request->getQueryParams()['id'] ?? 0);
186 
187  // Load page info array
188  $this->pageinfo = ‪BackendUtility::readPageAccess($this->id, $this->‪getBackendUser()->getPagePermsClause(‪Permission::PAGE_SHOW));
189  if ($this->pageinfo !== false) {
190  // If page info is not resolved, user has no access or the ID parameter was malformed.
191  $this->context = GeneralUtility::makeInstance(
192  PageLayoutContext::class,
193  $this->pageinfo,
194  GeneralUtility::makeInstance(BackendLayoutView::class)->getBackendLayoutForPage($this->id)
195  );
196  }
197 
199  $currentSite = $request->getAttribute('site');
200  $this->availableLanguages = $currentSite->getAvailableLanguages($this->‪getBackendUser(), false, $this->id);
201  // initialize page/be_user TSconfig settings
202  $pageTsConfig = ‪BackendUtility::getPagesTSconfig($this->id);
203  $this->modSharedTSconfig['properties'] = $pageTsConfig['mod.']['SHARED.'] ?? [];
204  $this->modTSconfig['properties'] = $pageTsConfig['mod.']['web_layout.'] ?? [];
205 
206  // Initialize menu
207  $this->‪menuConfig($request);
208  // Setting sys language from session var
209  $this->current_sys_language = (int)$this->MOD_SETTINGS['language'];
210 
211  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Recordlist/ClearCache');
212 
213  $this->‪main($request);
214  return new ‪HtmlResponse($this->moduleTemplate->renderContent());
215  }
216 
221  protected function ‪menuConfig(ServerRequestInterface $request): void
222  {
223  // MENU-ITEMS:
224  $this->MOD_MENU = [
225  'tt_content_showHidden' => '',
226  'function' => [
227  1 => $this->‪getLanguageService()->‪getLL('m_function_1'),
228  2 => $this->‪getLanguageService()->‪getLL('m_function_2')
229  ],
230  'language' => [
231  0 => $this->‪getLanguageService()->‪getLL('m_default')
232  ]
233  ];
234 
235  // First, select all localized page records on the current page.
236  // Each represents a possibility for a language on the page. Add these to language selector.
237  if ($this->id) {
238  // Compile language data for pid != 0 only. The language drop-down is not shown on pid 0
239  // since pid 0 can't be localized.
240  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
241  $queryBuilder->getRestrictions()->removeAll()
242  ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
243  ->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, (int)$this->‪getBackendUser()->workspace));
244  $statement = $queryBuilder->select('uid', ‪$GLOBALS['TCA']['pages']['ctrl']['languageField'])
245  ->from('pages')
246  ->where(
247  $queryBuilder->expr()->eq(
248  ‪$GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField'],
249  $queryBuilder->createNamedParameter($this->id, \PDO::PARAM_INT)
250  )
251  )->execute();
252  while ($pageTranslation = $statement->fetch()) {
253  $languageId = $pageTranslation[‪$GLOBALS['TCA']['pages']['ctrl']['languageField']];
254  if (isset($this->availableLanguages[$languageId])) {
255  $this->MOD_MENU['language'][$languageId] = $this->availableLanguages[$languageId]->getTitle();
256  }
257  }
258  // Override the label
259  if (isset($this->availableLanguages[0])) {
260  $this->MOD_MENU['language'][0] = $this->availableLanguages[0]->getTitle();
261  }
262  }
263  // Initialize the available actions
264  $actions = $this->‪initActions();
265  // Clean up settings
266  $this->MOD_SETTINGS = ‪BackendUtility::getModuleData($this->MOD_MENU, $request->getParsedBody()['SET'] ?? $request->getQueryParams()['SET'] ?? [], $this->moduleName);
267  // For all elements to be shown in draft workspaces & to also show hidden elements by default if user hasn't disabled the option
268  if ($this->‪getBackendUser()->workspace != 0
269  || !isset($this->MOD_SETTINGS['tt_content_showHidden'])
270  || $this->MOD_SETTINGS['tt_content_showHidden'] !== '0'
271  ) {
272  $this->MOD_SETTINGS['tt_content_showHidden'] = 1;
273  }
274  // Make action menu from available actions
275  $this->‪makeActionMenu($actions);
276  }
277 
283  protected function ‪initActions(): array
284  {
285  $actions = [
286  1 => $this->‪getLanguageService()->‪getLL('m_function_1')
287  ];
288  // Find if there are ANY languages at all (and if not, do not show the language option from function menu).
289  // The second check is for an edge case: Only two languages in the site and the default is not allowed.
290  if (count($this->availableLanguages) > 1 || (int)array_key_first($this->availableLanguages) > 0) {
291  $actions[2] = $this->‪getLanguageService()->‪getLL('m_function_2');
292  }
293 
295  // Page / user TSconfig blinding of menu-items
296  $blindActions = $this->modTSconfig['properties']['menu.']['functions.'] ?? [];
297  foreach ($blindActions as $key => $value) {
298  if (!$value && array_key_exists($key, $actions)) {
299  unset($actions[$key]);
300  }
301  }
302 
303  return $actions;
304  }
305 
312  protected function ‪makeActionMenu(array $actions): void
313  {
314  $actionMenu = $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->makeMenu();
315  $actionMenu->setIdentifier('actionMenu');
316  $actionMenu->setLabel('');
317 
318  $defaultKey = null;
319  $foundDefaultKey = false;
320  foreach ($actions as $key => $action) {
321  $menuItem = $actionMenu
322  ->makeMenuItem()
323  ->setTitle($action)
324  ->setHref((string)$this->uriBuilder->buildUriFromRoute($this->moduleName) . '&id=' . $this->id . '&SET[function]=' . $key);
325 
326  if (!$foundDefaultKey) {
327  $defaultKey = $key;
328  $foundDefaultKey = true;
329  }
330  if ((int)$this->MOD_SETTINGS['function'] === $key) {
331  $menuItem->setActive(true);
332  $defaultKey = null;
333  }
334  $actionMenu->addMenuItem($menuItem);
335  }
336  if (isset($defaultKey)) {
337  $this->MOD_SETTINGS['function'] = $defaultKey;
338  }
339  $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->addMenu($actionMenu);
340  }
341 
347  protected function ‪getHeaderFlashMessagesForCurrentPid(): string
348  {
349  $content = '';
350  $lang = $this->‪getLanguageService();
351 
352  $view = GeneralUtility::makeInstance(StandaloneView::class);
353  $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));
354 
355  // If page is a folder
356  if ($this->pageinfo['doktype'] == ‪PageRepository::DOKTYPE_SYSFOLDER) {
357  $moduleLoader = GeneralUtility::makeInstance(ModuleLoader::class);
358  $moduleLoader->load(‪$GLOBALS['TBE_MODULES']);
359  $modules = $moduleLoader->modules;
360  if (is_array($modules['web']['sub']['list'])) {
361  $title = $lang->getLL('goToListModule');
362  $message = '<p>' . $lang->getLL('goToListModuleMessage') . '</p>';
363  $message .= '<a class="btn btn-info" href="javascript:top.goToModule(\'web_list\',1);">' . $lang->getLL('goToListModule') . '</a>';
364  $view->assignMultiple([
365  'title' => $title,
366  'message' => $message,
368  ]);
369  $content .= $view->render();
370  }
371  } elseif ($this->pageinfo['doktype'] === ‪PageRepository::DOKTYPE_SHORTCUT) {
372  $shortcutMode = (int)$this->pageinfo['shortcut_mode'];
373  $pageRepository = GeneralUtility::makeInstance(PageRepository::class);
374  $targetPage = [];
375  $message = '';
377 
378  if ($shortcutMode || $this->pageinfo['shortcut']) {
379  switch ($shortcutMode) {
381  $targetPage = $this->‪getTargetPageIfVisible($pageRepository->getPage($this->pageinfo['shortcut']));
382  $message .= $targetPage === [] ? $lang->getLL('pageIsMisconfiguredOrNotAccessibleInternalLinkMessage') : '';
383  break;
385  $menuOfPages = $pageRepository->getMenu($this->pageinfo['uid'], '*', 'sorting', 'AND hidden = 0');
386  $targetPage = reset($menuOfPages) ?: [];
387  $message .= $targetPage === [] ? $lang->getLL('pageIsMisconfiguredFirstSubpageMessage') : '';
388  break;
390  $targetPage = $this->‪getTargetPageIfVisible($pageRepository->getPage($this->pageinfo['pid']));
391  $message .= $targetPage === [] ? $lang->getLL('pageIsMisconfiguredParentPageMessage') : '';
392  break;
394  $possibleTargetPages = $pageRepository->getMenu($this->pageinfo['uid'], '*', 'sorting', 'AND hidden = 0');
395  if ($possibleTargetPages === []) {
396  $message .= $lang->getLL('pageIsMisconfiguredOrNotAccessibleRandomInternalLinkMessage');
397  break;
398  }
399  $message = $lang->getLL('pageIsRandomInternalLinkMessage');
401  break;
402  }
403  $message = htmlspecialchars($message);
404  if ($targetPage !== [] && $shortcutMode !== ‪PageRepository::SHORTCUT_MODE_RANDOM_SUBPAGE) {
405  $linkToPid = GeneralUtility::linkThisScript(['id' => $targetPage['uid']]);
406  $path = ‪BackendUtility::getRecordPath($targetPage['uid'], $this->‪getBackendUser()->getPagePermsClause(‪Permission::PAGE_SHOW), 1000);
407  $linkedPath = '<a href="' . htmlspecialchars($linkToPid) . '">' . htmlspecialchars($path) . '</a>';
408  $message .= sprintf(htmlspecialchars($lang->getLL('pageIsInternalLinkMessage')), $linkedPath);
409  $message .= ' (' . htmlspecialchars($lang->sL(‪BackendUtility::getLabelFromItemlist('pages', 'shortcut_mode', (string)$shortcutMode))) . ')';
411  }
412  } else {
413  $message = htmlspecialchars($lang->getLL('pageIsMisconfiguredInternalLinkMessage'));
415  }
416 
417  $view->assignMultiple([
418  'title' => $this->pageinfo['title'],
419  'message' => $message,
420  'state' => $state
421  ]);
422  $content .= $view->render();
423  } elseif ($this->pageinfo['doktype'] === ‪PageRepository::DOKTYPE_LINK) {
424  if (empty($this->pageinfo['url'])) {
425  $view->assignMultiple([
426  'title' => $this->pageinfo['title'],
427  'message' => $lang->getLL('pageIsMisconfiguredExternalLinkMessage'),
429  ]);
430  $content .= $view->render();
431  } else {
432  $externalUrl = GeneralUtility::makeInstance(PageRepository::class)->getExtURL($this->pageinfo);
433  if (is_string($externalUrl)) {
434  $externalUrl = htmlspecialchars($externalUrl);
435  $externalUrlHtml = '<a href="' . $externalUrl . '" target="_blank" rel="noreferrer">' . $externalUrl . '</a>';
436  $view->assignMultiple([
437  'title' => $this->pageinfo['title'],
438  'message' => sprintf($lang->getLL('pageIsExternalLinkMessage'), $externalUrlHtml),
440  ]);
441  $content .= $view->render();
442  }
443  }
444  }
445  // If content from different pid is displayed
446  if ($this->pageinfo['content_from_pid']) {
447  $contentPage = (array)‪BackendUtility::getRecord('pages', (int)$this->pageinfo['content_from_pid']);
448  $linkToPid = GeneralUtility::linkThisScript(['id' => $this->pageinfo['content_from_pid']]);
449  $title = ‪BackendUtility::getRecordTitle('pages', $contentPage);
450  $link = '<a href="' . htmlspecialchars($linkToPid) . '">' . htmlspecialchars($title) . ' (PID ' . (int)$this->pageinfo['content_from_pid'] . ')</a>';
451  $message = sprintf($lang->getLL('content_from_pid_title'), $link);
452  $view->assignMultiple([
453  'title' => $title,
454  'message' => $message,
456  ]);
457  $content .= $view->render();
458  } else {
459  $links = $this->‪getPageLinksWhereContentIsAlsoShownOn($this->pageinfo['uid']);
460  if (!empty($links)) {
461  $message = sprintf($lang->getLL('content_on_pid_title'), $links);
462  $view->assignMultiple([
463  'title' => '',
464  'message' => $message,
466  ]);
467  $content .= $view->render();
468  }
469  }
470  return $content;
471  }
472 
479  protected function ‪getPageLinksWhereContentIsAlsoShownOn($pageId): string
480  {
481  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
482  $queryBuilder->getRestrictions()->removeAll();
483  $queryBuilder->getRestrictions()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
484  $queryBuilder
485  ->select('*')
486  ->from('pages')
487  ->where($queryBuilder->expr()->eq('content_from_pid', $queryBuilder->createNamedParameter($pageId, \PDO::PARAM_INT)));
488 
489  $links = [];
490  $rows = $queryBuilder->execute()->fetchAll();
491  if (!empty($rows)) {
492  foreach ($rows as $row) {
493  $linkToPid = GeneralUtility::linkThisScript(['id' => $row['uid']]);
494  $title = ‪BackendUtility::getRecordTitle('pages', $row);
495  $link = '<a href="' . htmlspecialchars($linkToPid) . '">' . htmlspecialchars($title) . ' (PID ' . (int)$row['uid'] . ')</a>';
496  $links[] = $link;
497  }
498  }
499  return implode(', ', $links);
500  }
501 
505  protected function ‪getLocalizedPageTitle(): string
506  {
507  if ($this->current_sys_language > 0) {
508  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
509  ->getQueryBuilderForTable('pages');
510  $queryBuilder->getRestrictions()
511  ->removeAll()
512  ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
513  ->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, (int)$this->‪getBackendUser()->workspace));
514  $localizedPage = $queryBuilder
515  ->select('*')
516  ->from('pages')
517  ->where(
518  $queryBuilder->expr()->eq(
519  ‪$GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField'],
520  $queryBuilder->createNamedParameter($this->id, \PDO::PARAM_INT)
521  ),
522  $queryBuilder->expr()->eq(
523  ‪$GLOBALS['TCA']['pages']['ctrl']['languageField'],
524  $queryBuilder->createNamedParameter($this->current_sys_language, \PDO::PARAM_INT)
525  )
526  )
527  ->setMaxResults(1)
528  ->execute()
529  ->fetch();
530  ‪BackendUtility::workspaceOL('pages', $localizedPage);
531  return $localizedPage['title'];
532  }
533  return $this->pageinfo['title'];
534  }
535 
542  protected function ‪main(ServerRequestInterface $request): void
543  {
544  $content = '';
545  // Access check...
546  // The page will show only if there is a valid page and if this page may be viewed by the user
547  if ($this->id && is_array($this->pageinfo)) {
548  $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
549 
550  $this->moduleTemplate->addJavaScriptCode('mainJsFunctions', '
551  if (top.fsMod) {
552  top.fsMod.recentIds["web"] = ' . (int)$this->id . ';
553  top.fsMod.navFrameHighlightedID["web"] = top.fsMod.currentBank + "_" + ' . (int)$this->id . ';
554  }
555  function deleteRecord(table,id,url) { //
556  window.location.href = ' . GeneralUtility::quoteJSvalue((string)$this->uriBuilder->buildUriFromRoute('tce_db') . '&cmd[')
557  . ' + table + "][" + id + "][delete]=1&redirect=" + encodeURIComponent(url);
558  return false;
559  }
560  ');
561 
562  if ($this->context instanceof PageLayoutContext) {
563  $backendLayout = $this->context->getBackendLayout();
564 
565  // Find backend layout / columns
566  if (!empty($backendLayout->getColumnPositionNumbers())) {
567  $this->colPosList = implode(',', $backendLayout->getColumnPositionNumbers());
568  }
569  // Removing duplicates, if any
570  $this->colPosList = array_unique(‪GeneralUtility::intExplode(',', $this->colPosList));
571  // Accessible columns
572  if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {
573  $this->activeColPosList = array_unique(‪GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));
574  // Match with the list which is present in the colPosList for the current page
575  if (!empty($this->colPosList) && !empty($this->activeColPosList)) {
576  $this->activeColPosList = array_unique(array_intersect(
577  $this->activeColPosList,
578  $this->colPosList
579  ));
580  }
581  } else {
582  $this->activeColPosList = ‪$this->colPosList;
583  }
584  $this->activeColPosList = implode(',', $this->activeColPosList);
585  $this->colPosList = implode(',', $this->colPosList);
586  }
587 
588  $content .= $this->‪getHeaderFlashMessagesForCurrentPid();
589 
590  // Render the primary module content:
591  $content .= '<form action="' . htmlspecialchars((string)$this->uriBuilder->buildUriFromRoute($this->moduleName, ['id' => $this->id])) . '" id="PageLayoutController" method="post">';
592  // Page title
593  $content .= '<h1 class="' . ($this->‪isPageEditable($this->current_sys_language) ? 't3js-title-inlineedit' : '') . '">' . htmlspecialchars($this->‪getLocalizedPageTitle()) . '</h1>';
594  // All other listings
595  $content .= $this->‪renderContent();
596  $content .= '</form>';
597  $content .= ‪$this->searchContent;
598  // Setting up the buttons for the docheader
599  $this->‪makeButtons($request);
600 
601  // Create LanguageMenu
602  $this->‪makeLanguageMenu();
603  } else {
604  $this->moduleTemplate->addJavaScriptCode(
605  'mainJsFunctions',
606  'if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';'
607  );
608  $content .= '<h1>' . htmlspecialchars(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';
609  $view = GeneralUtility::makeInstance(StandaloneView::class);
610  $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));
611  $view->assignMultiple([
612  'title' => $this->‪getLanguageService()->getLL('clickAPage_header'),
613  'message' => $this->‪getLanguageService()->getLL('clickAPage_content'),
615  ]);
616  $content .= $view->render();
617  }
618  // Set content
619  $this->moduleTemplate->setContent($content);
620  }
621 
627  protected function ‪renderContent(): string
628  {
629  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextMenu');
630  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Tooltip');
631  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Localization');
632  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LayoutModule/DragDrop');
633  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Modal');
634  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/LayoutModule/Paste');
635  $this->pageRenderer->addInlineLanguageLabelFile('EXT:backend/Resources/Private/Language/locallang_layout.xlf');
636 
637  $tableOutput = '';
638  $numberOfHiddenElements = 0;
639 
640  if ($this->context instanceof PageLayoutContext) {
641  // Context may not be set, which happens if the page module is viewed by a user with no access to the
642  // current page, or if the ID parameter is malformed. In this case we do not resolve any backend layout
643  // or other page structure information and we do not render any "table output" for the module.
644  $backendLayout = $this->context->getBackendLayout();
645 
646  $configuration = $this->context->getDrawingConfiguration();
647  $configuration->setDefaultLanguageBinding(!empty($this->modTSconfig['properties']['defLangBinding']));
648  $configuration->setActiveColumns(‪GeneralUtility::trimExplode(',', $this->activeColPosList));
649  $configuration->setShowHidden((bool)$this->MOD_SETTINGS['tt_content_showHidden']);
650  $configuration->setLanguageColumns($this->MOD_MENU['language']);
651  $configuration->setShowNewContentWizard(empty($this->modTSconfig['properties']['disableNewContentElementWizard']));
652  $configuration->setSelectedLanguageId((int)$this->MOD_SETTINGS['language']);
653  if ($this->MOD_SETTINGS['function'] == 2) {
654  $configuration->setLanguageMode(true);
655  }
656 
657  $numberOfHiddenElements = $this->‪getNumberOfHiddenElements($configuration->getLanguageColumns());
658 
659  if (GeneralUtility::makeInstance(Features::class)->isFeatureEnabled('fluidBasedPageModule')) {
660  $pageLayoutDrawer = $this->context->getBackendLayoutRenderer();
661 
662  $pageActionsCallback = null;
663  if ($this->context->isPageEditable()) {
664  $languageOverlayId = 0;
665  $pageLocalizationRecord = ‪BackendUtility::getRecordLocalization('pages', $this->id, (int)$this->current_sys_language);
666  if (is_array($pageLocalizationRecord)) {
667  $pageLocalizationRecord = reset($pageLocalizationRecord);
668  }
669  if (!empty($pageLocalizationRecord['uid'])) {
670  $languageOverlayId = $pageLocalizationRecord['uid'];
671  }
672  $pageActionsCallback = 'function(PageActions) {
673  PageActions.setPageId(' . (int)$this->id . ');
674  PageActions.setLanguageOverlayId(' . $languageOverlayId . ');
675  }';
676  }
677  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/PageActions', $pageActionsCallback);
678  $tableOutput = $pageLayoutDrawer->drawContent();
679  } else {
680  $dbList = ‪PageLayoutView::createFromPageLayoutContext($this->context);
681  // Setting up the tt_content columns to show
682  $colList = array_keys($backendLayout->getUsedColumns());
683  if ($this->colPosList !== '') {
684  $colList = array_intersect(‪GeneralUtility::intExplode(',', $this->colPosList), $colList);
685  }
686  // The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
687  $dbList->tt_contentConfig['cols'] = implode(',', $colList);
688  $tableOutput = $dbList->getTable_tt_content($this->id);
689  }
690  }
691 
692  if ($this->‪getBackendUser()->check('tables_select', 'tt_content') && $numberOfHiddenElements > 0) {
693  // Toggle hidden ContentElements
694  $tableOutput .= '
695  <div class="checkbox">
696  <label for="checkTt_content_showHidden">
697  <input type="checkbox" id="checkTt_content_showHidden" class="checkbox" name="SET[tt_content_showHidden]" value="1" ' . ($this->MOD_SETTINGS['tt_content_showHidden'] ? 'checked="checked"' : '') . ' />
698  ' . htmlspecialchars($this->‪getLanguageService()->‪getLL('hiddenCE')) . ' (<span class="t3js-hidden-counter">' . $numberOfHiddenElements . '</span>)
699  </label>
700  </div>';
701  }
702 
703  // Init the content
704  $content = '';
705  // Additional header content
706  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawHeaderHook'] ?? [] as $hook) {
707  $params = [];
708  $content .= GeneralUtility::callUserFunction($hook, $params, $this);
709  }
710  $content .= $tableOutput;
711  // Making search form:
712  if (!$this->modTSconfig['properties']['disableSearchBox']) {
713  $this->searchContent = $this->‪getSearchBox();
714  if ($this->searchContent) {
715  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ToggleSearchToolbox');
716  $toggleSearchFormButton = $this->buttonBar->makeLinkButton()
717  ->setClasses('t3js-toggle-search-toolbox')
718  ->setTitle($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.searchIcon'))
719  ->setIcon($this->iconFactory->getIcon('actions-search', ‪Icon::SIZE_SMALL))
720  ->setHref('#');
721  $this->buttonBar->addButton($toggleSearchFormButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 4);
722  }
723  }
724  // Additional footer content
725  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/db_layout.php']['drawFooterHook'] ?? [] as $hook) {
726  $params = [];
727  $content .= GeneralUtility::callUserFunction($hook, $params, $this);
728  }
729  return $content;
730  }
731 
732  /***************************
733  *
734  * Sub-content functions, rendering specific parts of the module content.
735  *
736  ***************************/
741  protected function ‪makeButtons(ServerRequestInterface $request): void
742  {
743  // Add CSH (Context Sensitive Help) icon to tool bar
744  $contextSensitiveHelpButton = $this->buttonBar->makeHelpButton()
745  ->setModuleName('_MOD_' . $this->moduleName)
746  ->setFieldName('columns_' . $this->MOD_SETTINGS['function']);
747  $this->buttonBar->addButton($contextSensitiveHelpButton);
748  $lang = $this->‪getLanguageService();
749  // View page
750  $pageTsConfig = ‪BackendUtility::getPagesTSconfig($this->id);
751  // Exclude sysfolders, spacers and recycler by default
752  $excludeDokTypes = [
756  ];
757  // Custom override of values
758  if (isset($pageTsConfig['TCEMAIN.']['preview.']['disableButtonForDokType'])) {
759  $excludeDokTypes = ‪GeneralUtility::intExplode(
760  ',',
761  $pageTsConfig['TCEMAIN.']['preview.']['disableButtonForDokType'],
762  true
763  );
764  }
765 
766  if (
767  !in_array((int)$this->pageinfo['doktype'], $excludeDokTypes, true)
768  && !‪VersionState::cast($this->pageinfo['t3ver_state'])->equals(‪VersionState::DELETE_PLACEHOLDER)
769  ) {
770  $languageParameter = $this->current_sys_language ? ('&L=' . ‪$this->current_sys_language) : '';
772  $this->pageinfo['uid'],
773  '',
774  ‪BackendUtility::BEgetRootLine($this->pageinfo['uid']),
775  '',
776  '',
777  $languageParameter
778  );
779  $viewButton = $this->buttonBar->makeLinkButton()
780  ->setOnClick($onClick)
781  ->setTitle($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.showPage'))
782  ->setIcon($this->iconFactory->getIcon('actions-view-page', ‪Icon::SIZE_SMALL))
783  ->setHref('#');
784 
785  $this->buttonBar->addButton($viewButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 3);
786  }
787  // Shortcut
788  $shortcutButton = $this->buttonBar->makeShortcutButton()
789  ->setModuleName($this->moduleName)
790  ->setGetVariables([
791  'id',
792  'route',
793  'edit_record',
794  ])
795  ->setSetVariables(array_keys($this->MOD_MENU));
796  $this->buttonBar->addButton($shortcutButton);
797 
798  // Cache
799  if (empty($this->modTSconfig['properties']['disableAdvanced'])) {
800  $clearCacheButton = $this->buttonBar->makeLinkButton()
801  ->setHref('#')
802  ->setDataAttributes(['id' => $this->pageinfo['uid']])
803  ->setClasses('t3js-clear-page-cache')
804  ->setTitle($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.clear_cache'))
805  ->setIcon($this->iconFactory->getIcon('actions-system-cache-clear', ‪Icon::SIZE_SMALL));
806  $this->buttonBar->addButton($clearCacheButton, ‪ButtonBar::BUTTON_POSITION_RIGHT, 1);
807  }
808  if (empty($this->modTSconfig['properties']['disableIconToolbar'])) {
809  // Edit page properties
810  if ($this->‪isPageEditable(0)) {
811  $url = (string)$this->uriBuilder->buildUriFromRoute('record_edit', [
812  'edit' => [
813  'pages' => [
814  $this->id => 'edit'
815  ]
816  ],
817  'returnUrl' => $request->getAttribute('normalizedParams')->getRequestUri(),
818  ]);
819  $editPageButton = $this->buttonBar->makeLinkButton()
820  ->setHref($url)
821  ->setTitle($lang->getLL('editPageProperties'))
822  ->setIcon($this->iconFactory->getIcon('actions-page-open', ‪Icon::SIZE_SMALL));
823  $this->buttonBar->addButton($editPageButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 3);
824  }
825  // Edit page properties of page language overlay (Only when one specific language is selected)
826  if ((int)$this->MOD_SETTINGS['function'] === 1
827  && $this->current_sys_language > 0
828  && $this->‪isPageEditable($this->current_sys_language)
829  ) {
830  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
831  $queryBuilder->getRestrictions()
832  ->removeAll()
833  ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
834  ->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, $this->‪getBackendUser()->workspace));
835  $overlayRecord = $queryBuilder
836  ->select('uid')
837  ->from('pages')
838  ->where(
839  $queryBuilder->expr()->eq(
840  ‪$GLOBALS['TCA']['pages']['ctrl']['transOrigPointerField'],
841  $queryBuilder->createNamedParameter($this->id, \PDO::PARAM_INT)
842  ),
843  $queryBuilder->expr()->eq(
844  ‪$GLOBALS['TCA']['pages']['ctrl']['languageField'],
845  $queryBuilder->createNamedParameter($this->current_sys_language, \PDO::PARAM_INT)
846  )
847  )
848  ->setMaxResults(1)
849  ->execute()
850  ->fetch();
851  ‪BackendUtility::workspaceOL('pages', $overlayRecord, $this->‪getBackendUser()->workspace);
852  // Edit button
853  $url = (string)$this->uriBuilder->buildUriFromRoute('record_edit', [
854  'edit' => [
855  'pages' => [
856  $overlayRecord['uid'] => 'edit'
857  ]
858  ],
859  'returnUrl' => $request->getAttribute('normalizedParams')->getRequestUri(),
860  ]);
861  $editLanguageButton = $this->buttonBar->makeLinkButton()
862  ->setHref($url)
863  ->setTitle($lang->getLL('editPageLanguageOverlayProperties'))
864  ->setIcon($this->iconFactory->getIcon('mimetypes-x-content-page-language-overlay', ‪Icon::SIZE_SMALL));
865  $this->buttonBar->addButton($editLanguageButton, ‪ButtonBar::BUTTON_POSITION_LEFT, 3);
866  }
867  }
868  }
869 
870  /*******************************
871  *
872  * Other functions
873  *
874  ******************************/
882  protected function ‪getNumberOfHiddenElements(array $languageColumns): int
883  {
884  $andWhere = [];
885  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
886  $queryBuilder->getRestrictions()
887  ->removeAll()
888  ->add(GeneralUtility::makeInstance(DeletedRestriction::class))
889  ->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, (int)$this->‪getBackendUser()->workspace));
890 
891  $queryBuilder
892  ->count('uid')
893  ->from('tt_content')
894  ->where(
895  $queryBuilder->expr()->eq(
896  'pid',
897  $queryBuilder->createNamedParameter($this->id, \PDO::PARAM_INT)
898  )
899  );
900 
901  if (!empty($languageColumns)) {
902  // Multi-language view is active
903  if ($this->current_sys_language > 0) {
904  $queryBuilder->andWhere(
905  $queryBuilder->expr()->in(
906  'sys_language_uid',
907  [0, $queryBuilder->createNamedParameter($this->current_sys_language, \PDO::PARAM_INT)]
908  )
909  );
910  }
911  } else {
912  $queryBuilder->andWhere(
913  $queryBuilder->expr()->eq(
914  'sys_language_uid',
915  $queryBuilder->createNamedParameter($this->current_sys_language, \PDO::PARAM_INT)
916  )
917  );
918  }
919 
920  if (!empty(‪$GLOBALS['TCA']['tt_content']['ctrl']['enablecolumns']['disabled'])) {
921  $andWhere[] = $queryBuilder->expr()->neq(
922  'hidden',
923  $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
924  );
925  }
926 
927  if (!empty(‪$GLOBALS['TCA']['tt_content']['ctrl']['enablecolumns']['starttime'])) {
928  $andWhere[] = $queryBuilder->expr()->andX(
929  $queryBuilder->expr()->neq(
930  'starttime',
931  $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
932  ),
933  $queryBuilder->expr()->gt(
934  'starttime',
935  $queryBuilder->createNamedParameter(‪$GLOBALS['SIM_ACCESS_TIME'], \PDO::PARAM_INT)
936  )
937  );
938  }
939 
940  if (!empty(‪$GLOBALS['TCA']['tt_content']['ctrl']['enablecolumns']['endtime'])) {
941  $andWhere[] = $queryBuilder->expr()->andX(
942  $queryBuilder->expr()->neq(
943  'endtime',
944  $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)
945  ),
946  $queryBuilder->expr()->lte(
947  'endtime',
948  $queryBuilder->createNamedParameter(‪$GLOBALS['SIM_ACCESS_TIME'], \PDO::PARAM_INT)
949  )
950  );
951  }
952 
953  if (!empty($andWhere)) {
954  $queryBuilder->andWhere(
955  $queryBuilder->expr()->orX(...$andWhere)
956  );
957  }
958 
959  $count = $queryBuilder
960  ->execute()
961  ->fetchColumn(0);
962 
963  return (int)$count;
964  }
965 
972  protected function ‪isPageEditable(int $languageId): bool
973  {
974  if (‪$GLOBALS['TCA']['pages']['ctrl']['readOnly'] ?? false) {
975  return false;
976  }
977  $backendUser = $this->‪getBackendUser();
978  if ($backendUser->isAdmin()) {
979  return true;
980  }
981  if (‪$GLOBALS['TCA']['pages']['ctrl']['adminOnly'] ?? false) {
982  return false;
983  }
984 
985  return $this->pageinfo !== []
986  && !(bool)($this->pageinfo[‪$GLOBALS['TCA']['pages']['ctrl']['editlock'] ?? null] ?? false)
987  && $backendUser->doesUserHaveAccess($this->pageinfo, ‪Permission::PAGE_EDIT)
988  && $backendUser->checkLanguageAccess($languageId)
989  && $backendUser->check('tables_modify', 'pages');
990  }
991 
998  protected function ‪isContentEditable(int $languageId): bool
999  {
1000  if ($this->‪getBackendUser()->isAdmin()) {
1001  return true;
1002  }
1003 
1004  return !$this->pageinfo['editlock']
1006  && $this->‪getBackendUser()->‪checkLanguageAccess($languageId);
1007  }
1008 
1015  {
1016  return ‪$GLOBALS['LANG'];
1017  }
1018 
1024  protected function ‪getBackendUser(): ‪BackendUserAuthentication
1025  {
1026  return ‪$GLOBALS['BE_USER'];
1027  }
1028 
1032  protected function ‪makeLanguageMenu(): void
1033  {
1034  if (count($this->MOD_MENU['language']) > 1) {
1035  $languageMenu = $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->makeMenu();
1036  $languageMenu->setIdentifier('languageMenu');
1037  foreach ($this->MOD_MENU['language'] as $key => $language) {
1038  $menuItem = $languageMenu
1039  ->makeMenuItem()
1040  ->setTitle($language)
1041  ->setHref((string)$this->uriBuilder->buildUriFromRoute($this->moduleName) . '&id=' . $this->id . '&SET[language]=' . $key);
1042  if ((int)$this->current_sys_language === $key) {
1043  $menuItem->setActive(true);
1044  }
1045  $languageMenu->addMenuItem($menuItem);
1046  }
1047  $this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->addMenu($languageMenu);
1048  }
1049  }
1058  protected function ‪getTargetPageIfVisible(array $targetPage): array
1059  {
1060  return !(bool)($targetPage['hidden'] ?? false) ? $targetPage : [];
1061  }
1062 
1068  protected function ‪getSearchBox(): string
1069  {
1070  if (!$this->‪getBackendUser()->check('modules', 'web_list')) {
1071  return '';
1072  }
1073  $lang = $this->‪getLanguageService();
1074  $listModule = $this->uriBuilder->buildUriFromRoute('web_list', ['id' => $this->id]);
1075  // Make level selector:
1076  $opt = [];
1077 
1078  // "New" generation of search levels ... based on TS config
1079  $config = ‪BackendUtility::getPagesTSconfig($this->id);
1080  $searchLevelsFromTSconfig = $config['mod.']['web_list.']['searchLevel.']['items.'];
1081  $searchLevelItems = [];
1082 
1083  // get translated labels for search levels from pagets
1084  foreach ($searchLevelsFromTSconfig as $keySearchLevel => $labelConfigured) {
1085  $label = $lang->sL('LLL:' . $labelConfigured);
1086  if ($label === '') {
1087  $label = $labelConfigured;
1088  }
1089  $searchLevelItems[$keySearchLevel] = $label;
1090  }
1091 
1092  foreach ($searchLevelItems as $kv => $label) {
1093  $opt[] = '<option value="' . $kv . '"' . ($kv === 0 ? ' selected="selected"' : '') . '>'
1094  . htmlspecialchars($label)
1095  . '</option>';
1096  }
1097  $searchLevelLabel = $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.search_levels');
1098  $searchStringLabel = $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.label.searchString');
1099  $lMenu = '<select class="form-control" name="search_levels" title="' . htmlspecialchars($searchLevelLabel) . '" id="search_levels">' . implode('', $opt) . '</select>';
1100  return '<div class="db_list-searchbox-form db_list-searchbox-toolbar module-docheader-bar module-docheader-bar-search t3js-module-docheader-bar t3js-module-docheader-bar-search" id="db_list-searchbox-toolbar" style="display: none;">
1101  <form action="' . htmlspecialchars((string)$listModule) . '" method="post">
1102  <div id="typo3-dblist-search">
1103  <div class="panel panel-default">
1104  <div class="panel-body">
1105  <div class="row">
1106  <div class="form-group col-xs-12">
1107  <label for="search_field">' . htmlspecialchars($searchStringLabel) . ': </label>
1108  <input class="form-control" type="search" placeholder="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.enterSearchString')) . '" title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.searchString')) . '" name="search_field" id="search_field" value="" />
1109  </div>
1110  <div class="form-group col-xs-12 col-sm-6">
1111  <label for="search_levels">' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.label.search_levels')) . ': </label>
1112  ' . $lMenu . '
1113  </div>
1114  <div class="form-group col-xs-12 col-sm-6">
1115  <label for="showLimit">' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.label.limit')) . ': </label>
1116  <input class="form-control" type="number" min="0" max="10000" placeholder="10" title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.limit')) . '" name="showLimit" id="showLimit" value="" />
1117  </div>
1118  <div class="form-group col-xs-12">
1119  <div class="form-control-wrap">
1120  <button type="submit" class="btn btn-default" name="search" title="' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.title.search')) . '">
1121  ' . $this->iconFactory->getIcon('actions-search', ‪Icon::SIZE_SMALL)->render() . ' ' . htmlspecialchars($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.search')) . '
1122  </button>
1123  </div>
1124  </div>
1125  </div>
1126  </div>
1127  </div>
1128  </div>
1129  </form>
1130  </div>';
1131  }
1132 }
‪TYPO3\CMS\Backend\Controller\PageLayoutController\renderContent
‪string renderContent()
Definition: PageLayoutController.php:609
‪TYPO3\CMS\Backend\Controller\PageLayoutController\main
‪main(ServerRequestInterface $request)
Definition: PageLayoutController.php:524
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:30
‪TYPO3\CMS\Core\Site\Entity\SiteInterface
Definition: SiteInterface.php:26
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$searchContent
‪string $searchContent
Definition: PageLayoutController.php:132
‪TYPO3\CMS\Backend\View\PageLayoutView\createFromPageLayoutContext
‪static PageLayoutView createFromPageLayoutContext(PageLayoutContext $context)
Definition: PageLayoutView.php:196
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$buttonBar
‪ButtonBar $buttonBar
Definition: PageLayoutController.php:128
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$current_sys_language
‪int $current_sys_language
Definition: PageLayoutController.php:90
‪TYPO3\CMS\Core\Localization\LanguageService\includeLLFile
‪array includeLLFile($fileRef, $setGlobal=null, $mergeLocalOntoDefault=null)
Definition: LanguageService.php:297
‪TYPO3\CMS\Backend\Controller\PageLayoutController\makeButtons
‪makeButtons(ServerRequestInterface $request)
Definition: PageLayoutController.php:723
‪TYPO3\CMS\Backend\Controller\PageLayoutController\getLanguageService
‪LanguageService getLanguageService()
Definition: PageLayoutController.php:996
‪TYPO3\CMS\Backend\Template\Components\ButtonBar\BUTTON_POSITION_LEFT
‪const BUTTON_POSITION_LEFT
Definition: ButtonBar.php:36
‪TYPO3\CMS\Backend\Template\Components\ButtonBar
Definition: ButtonBar.php:32
‪TYPO3\CMS\Backend\Controller\PageLayoutController\getTargetPageIfVisible
‪array getTargetPageIfVisible(array $targetPage)
Definition: PageLayoutController.php:1040
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecordLocalization
‪static mixed getRecordLocalization($table, $uid, $language, $andWhereClause='')
Definition: BackendUtility.php:285
‪TYPO3\CMS\Backend\Controller\PageLayoutController\isPageEditable
‪bool isPageEditable(int $languageId)
Definition: PageLayoutController.php:954
‪TYPO3\CMS\Backend\Controller\PageLayoutController\isContentEditable
‪bool isContentEditable(int $languageId)
Definition: PageLayoutController.php:980
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper\STATE_INFO
‪const STATE_INFO
Definition: InfoboxViewHelper.php:62
‪TYPO3\CMS\Backend\Controller\PageLayoutController\makeLanguageMenu
‪makeLanguageMenu()
Definition: PageLayoutController.php:1014
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$moduleName
‪string $moduleName
Definition: PageLayoutController.php:120
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SHORTCUT
‪const DOKTYPE_SHORTCUT
Definition: PageRepository.php:105
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_LINK
‪const DOKTYPE_LINK
Definition: PageRepository.php:104
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$colPosList
‪string $colPosList
Definition: PageLayoutController.php:84
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$MOD_SETTINGS
‪array $MOD_SETTINGS
Definition: PageLayoutController.php:103
‪TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper\STATE_ERROR
‪const STATE_ERROR
Definition: InfoboxViewHelper.php:65
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$availableLanguages
‪SiteLanguage[] $availableLanguages
Definition: PageLayoutController.php:136
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:33
‪TYPO3\CMS\Core\Versioning\VersionState\DELETE_PLACEHOLDER
‪const DELETE_PLACEHOLDER
Definition: VersionState.php:55
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$modSharedTSconfig
‪array $modSharedTSconfig
Definition: PageLayoutController.php:71
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$moduleTemplate
‪ModuleTemplate $moduleTemplate
Definition: PageLayoutController.php:124
‪TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine
‪static array BEgetRootLine($uid, $clause='', $workspaceOL=false, array $additionalFields=[])
Definition: BackendUtility.php:343
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\SHORTCUT_MODE_RANDOM_SUBPAGE
‪const SHORTCUT_MODE_RANDOM_SUBPAGE
Definition: PageRepository.php:117
‪TYPO3\CMS\Backend\Template\ModuleTemplate
Definition: ModuleTemplate.php:43
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\SHORTCUT_MODE_FIRST_SUBPAGE
‪const SHORTCUT_MODE_FIRST_SUBPAGE
Definition: PageRepository.php:116
‪TYPO3\CMS\Backend\Controller\PageLayoutController\getNumberOfHiddenElements
‪int getNumberOfHiddenElements(array $languageColumns)
Definition: PageLayoutController.php:864
‪TYPO3\CMS\Core\Type\Bitmask\Permission
Definition: Permission.php:24
‪TYPO3\CMS\Core\Site\Entity\SiteLanguage
Definition: SiteLanguage.php:26
‪TYPO3\CMS\Backend\Controller\PageLayoutController\mainAction
‪ResponseInterface mainAction(ServerRequestInterface $request)
Definition: PageLayoutController.php:157
‪TYPO3\CMS\Core\Type\Enumeration\cast
‪static static cast($value)
Definition: Enumeration.php:186
‪TYPO3\CMS\Core\Page\PageRenderer
Definition: PageRenderer.php:42
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$context
‪PageLayoutContext null $context
Definition: PageLayoutController.php:148
‪TYPO3\CMS\Backend\Controller\PageLayoutController
Definition: PageLayoutController.php:53
‪TYPO3\CMS\Backend\Controller\PageLayoutController\menuConfig
‪menuConfig(ServerRequestInterface $request)
Definition: PageLayoutController.php:203
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:38
‪TYPO3\CMS\Backend\Controller\PageLayoutController\getPageLinksWhereContentIsAlsoShownOn
‪string getPageLinksWhereContentIsAlsoShownOn($pageId)
Definition: PageLayoutController.php:461
‪TYPO3\CMS\Backend\Controller\PageLayoutController\getHeaderFlashMessagesForCurrentPid
‪string getHeaderFlashMessagesForCurrentPid()
Definition: PageLayoutController.php:329
‪TYPO3\CMS\Backend\Module\ModuleLoader
Definition: ModuleLoader.php:34
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$iconFactory
‪IconFactory $iconFactory
Definition: PageLayoutController.php:114
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\doesUserHaveAccess
‪bool doesUserHaveAccess($row, $perms)
Definition: BackendUserAuthentication.php:330
‪TYPO3\CMS\Backend\Utility\BackendUtility\getPagesTSconfig
‪static array getPagesTSconfig($id)
Definition: BackendUtility.php:698
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$pageinfo
‪array bool $pageinfo
Definition: PageLayoutController.php:78
‪TYPO3\CMS\Core\Configuration\Features
Definition: Features.php:56
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle
‪static string getRecordTitle($table, $row, $prep=false, $forceResult=true)
Definition: BackendUtility.php:1541
‪TYPO3\CMS\Backend\Utility\BackendUtility\getModuleData
‪static array getModuleData( $MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')
Definition: BackendUtility.php:2893
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SPACER
‪const DOKTYPE_SPACER
Definition: PageRepository.php:108
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\checkLanguageAccess
‪bool checkLanguageAccess($langValue)
Definition: BackendUserAuthentication.php:709
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW
‪const PAGE_SHOW
Definition: Permission.php:33
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$uriBuilder
‪UriBuilder $uriBuilder
Definition: PageLayoutController.php:144
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SYSFOLDER
‪const DOKTYPE_SYSFOLDER
Definition: PageRepository.php:109
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:75
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$modTSconfig
‪array $modTSconfig
Definition: PageLayoutController.php:65
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecord
‪static array null getRecord($table, $uid, $fields=' *', $where='', $useDeleteClause=true)
Definition: BackendUtility.php:95
‪TYPO3\CMS\Backend\Controller\PageLayoutController\initActions
‪array initActions()
Definition: PageLayoutController.php:265
‪TYPO3\CMS\Core\Versioning\VersionState
Definition: VersionState.php:24
‪TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode
‪static string[] trimExplode($delim, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:1059
‪TYPO3\CMS\Backend\Utility\BackendUtility\readPageAccess
‪static array false readPageAccess($id, $perms_clause)
Definition: BackendUtility.php:597
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\SHORTCUT_MODE_PARENT_PAGE
‪const SHORTCUT_MODE_PARENT_PAGE
Definition: PageRepository.php:118
‪TYPO3\CMS\Backend\Utility\BackendUtility\viewOnClick
‪static string viewOnClick( $pageUid, $backPath='', $rootLine=null, $anchorSection='', $alternativeUrl='', $additionalGetVars='', $switchFocus=true)
Definition: BackendUtility.php:2359
‪TYPO3\CMS\Backend\Controller\PageLayoutController\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: PageLayoutController.php:1006
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$MOD_MENU
‪array $MOD_MENU
Definition: PageLayoutController.php:96
‪TYPO3\CMS\Fluid\View\StandaloneView
Definition: StandaloneView.php:34
‪TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT
‪const CONTENT_EDIT
Definition: Permission.php:53
‪TYPO3\CMS\Backend\View\BackendLayoutView
Definition: BackendLayoutView.php:36
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL
‪static workspaceOL($table, &$row, $wsid=-99, $unsetMovePointers=false)
Definition: BackendUtility.php:3586
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\SHORTCUT_MODE_NONE
‪const SHORTCUT_MODE_NONE
Definition: PageRepository.php:115
‪TYPO3\CMS\Backend\View\PageLayoutContext
Definition: PageLayoutContext.php:43
‪TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction
Definition: DeletedRestriction.php:28
‪TYPO3\CMS\Backend\View\PageLayoutView
Definition: PageLayoutView.php:61
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_EDIT
‪const PAGE_EDIT
Definition: Permission.php:38
‪TYPO3\CMS\Backend\Utility\BackendUtility\getLabelFromItemlist
‪static string getLabelFromItemlist($table, $col, $key)
Definition: BackendUtility.php:1410
‪TYPO3\CMS\Core\Utility\GeneralUtility\intExplode
‪static int[] intExplode($delimiter, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:988
‪TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper
Definition: InfoboxViewHelper.php:59
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$id
‪int $id
Definition: PageLayoutController.php:59
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Core\Domain\Repository\PageRepository
Definition: PageRepository.php:52
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Backend\Controller\PageLayoutController\getSearchBox
‪string getSearchBox()
Definition: PageLayoutController.php:1050
‪TYPO3\CMS\Core\Localization\LanguageService\getLL
‪string getLL($index)
Definition: LanguageService.php:154
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecordPath
‪static mixed getRecordPath($uid, $clause, $titleLimit, $fullTitleLimit=0)
Definition: BackendUtility.php:546
‪TYPO3\CMS\Backend\Template\Components\ButtonBar\BUTTON_POSITION_RIGHT
‪const BUTTON_POSITION_RIGHT
Definition: ButtonBar.php:41
‪TYPO3\CMS\Backend\Controller
Definition: AbstractFormEngineAjaxController.php:18
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$activeColPosList
‪string $activeColPosList
Definition: PageLayoutController.php:110
‪TYPO3\CMS\Backend\Controller\PageLayoutController\getLocalizedPageTitle
‪string getLocalizedPageTitle()
Definition: PageLayoutController.php:487
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_RECYCLER
‪const DOKTYPE_RECYCLER
Definition: PageRepository.php:110
‪TYPO3\CMS\Backend\Controller\PageLayoutController\$pageRenderer
‪PageRenderer $pageRenderer
Definition: PageLayoutController.php:140
‪TYPO3\CMS\Core\Http\HtmlResponse
Definition: HtmlResponse.php:26
‪TYPO3\CMS\Backend\Controller\PageLayoutController\makeActionMenu
‪makeActionMenu(array $actions)
Definition: PageLayoutController.php:294
‪TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction
Definition: WorkspaceRestriction.php:39