2 declare(strict_types = 1);
38 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.view',
39 'iconIdentifier' =>
'actions-view-page',
40 'callbackAction' =>
'viewRecord'
43 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.edit',
44 'iconIdentifier' =>
'actions-page-open',
45 'callbackAction' =>
'editRecord'
48 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.new',
49 'iconIdentifier' =>
'actions-page-new',
50 'callbackAction' =>
'newRecord'
53 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.info',
54 'iconIdentifier' =>
'actions-document-info',
55 'callbackAction' =>
'openInfoPopUp'
61 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.copy',
62 'iconIdentifier' =>
'actions-edit-copy',
63 'callbackAction' =>
'copy'
66 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.copy',
67 'iconIdentifier' =>
'actions-edit-copy-release',
68 'callbackAction' =>
'clipboardRelease'
71 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.cut',
72 'iconIdentifier' =>
'actions-edit-cut',
73 'callbackAction' =>
'cut'
76 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.cutrelease',
77 'iconIdentifier' =>
'actions-edit-cut-release',
78 'callbackAction' =>
'clipboardRelease'
81 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.pasteafter',
82 'iconIdentifier' =>
'actions-document-paste-after',
83 'callbackAction' =>
'pasteAfter'
86 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.pasteinto',
87 'iconIdentifier' =>
'actions-document-paste-into',
88 'callbackAction' =>
'pasteInto'
95 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.more',
96 'iconIdentifier' =>
'',
97 'callbackAction' =>
'openSubmenu',
100 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:CM_newWizard',
101 'iconIdentifier' =>
'actions-page-new',
102 'callbackAction' =>
'newPageWizard',
105 'label' =>
'LLL:EXT:backend/Resources/Private/Language/locallang_pages_sort.xlf:title',
106 'iconIdentifier' =>
'actions-page-move',
107 'callbackAction' =>
'pagesSort',
109 'pagesNewMultiple' => [
110 'label' =>
'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new.xlf:title',
111 'iconIdentifier' =>
'apps-pagetree-drag-move-between',
112 'callbackAction' =>
'pagesNewMultiple',
114 'openListModule' => [
115 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:CM_db_list',
116 'iconIdentifier' =>
'actions-system-list-open',
117 'callbackAction' =>
'openListModule',
119 'mountAsTreeRoot' => [
120 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.tempMountPoint',
121 'iconIdentifier' =>
'actions-pagetree-mountroot',
122 'callbackAction' =>
'mountAsTreeRoot',
130 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:enable',
131 'iconIdentifier' =>
'actions-edit-unhide',
132 'callbackAction' =>
'enableRecord',
135 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:disable',
136 'iconIdentifier' =>
'actions-edit-hide',
137 'callbackAction' =>
'disableRecord',
140 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.delete',
141 'iconIdentifier' =>
'actions-edit-delete',
142 'callbackAction' =>
'deleteRecord',
145 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:CM_history',
146 'iconIdentifier' =>
'actions-document-history-open',
147 'callbackAction' =>
'openHistoryPopUp',
150 'label' =>
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.clear_cache',
151 'iconIdentifier' =>
'actions-system-cache-clear',
152 'callbackAction' =>
'clearCache',
168 return $this->table ===
'pages';
184 protected function canRender(
string $itemName,
string $type):
bool
186 if (in_array($type, [
'divider',
'submenu'],
true)) {
189 if (in_array($itemName, $this->disabledItems,
true)) {
202 case 'pagesNewMultiple':
220 case 'openListModule':
226 case 'mountAsTreeRoot':
227 $canRender = !$this->
isRoot();
259 $this->pagePermissions = $this->backendUser->calcPerms($this->record);
270 if (!$this->backendUser->checkLanguageAccess(0)) {
283 if (!$this->languageAccess) {
289 if (isset(
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'readOnly']) &&
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'readOnly']) {
292 if ($this->backendUser->isAdmin()) {
295 if (isset(
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'adminOnly']) &&
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'adminOnly']) {
308 return (
bool)$this->record[
'editlock'];
318 if (!$this->languageAccess) {
321 if (isset(
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'languageField'])
322 && !in_array($this->record[
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'languageField']], [0, -1])
338 if (!$this->languageAccess) {
341 if (isset(
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'languageField'])
342 && !in_array($this->record[
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'languageField']], [0, -1])
360 if (!$this->languageAccess) {
363 $clipboardElementCount = count($this->clipboard->elFromTable($this->table));
365 return $clipboardElementCount
377 if (!$this->languageAccess) {
380 $clipboardElementCount = count($this->clipboard->elFromTable($this->table));
381 return $clipboardElementCount
393 if (!$this->languageAccess) {
396 return $this->backendUser->check(
'tables_modify', $this->table)
399 && $this->backendUser->workspace === 0;
409 if (!$this->languageAccess) {
446 && ($this->backendUser->isAdmin() || $this->backendUser->getTSConfig()[
'options.'][
'clearCache.'][
'pages'] ??
false);
466 return (
int)$this->identifier === 0;
476 return in_array($this->identifier, $this->backendUser->returnWebmounts());
486 if ($itemName ===
'view') {
489 if ($itemName ===
'enable' || $itemName ===
'disable') {
492 if ($itemName ===
'delete') {
495 if ($itemName ===
'pasteInto') {
498 if ($itemName ===
'pasteAfter') {
501 if ($itemName ===
'pagesSort') {
502 $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
504 'data-pages-sort-url' => (string)$uriBuilder->buildUriFromRoute(
'pages_sort', [
'id' => $this->record[
'uid']]),
507 if ($itemName ===
'pagesNewMultiple') {
508 $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
510 'data-pages-new-multiple-url' => (string)$uriBuilder->buildUriFromRoute(
'pages_new', [
'id' => $this->record[
'uid']]),
513 if ($itemName ===
'edit') {
515 'data-pages-language-uid' => $this->record[
'sys_language_uid']
526 return (
int)$this->record[
'sys_language_uid'] === 0 ? (int)$this->record[
'uid'] : (
int)$this->record[
'l10n_parent'];
536 $language = (int)$this->record[
'sys_language_uid'];
537 $additionalParams = ($language > 0) ?
'&L=' . $language :
'';
556 if ($this->backendUser->isAdmin()) {
560 if ($languageField !==
'' && isset($this->record[$languageField])) {
561 return $this->backendUser->checkLanguageAccess((
int)$this->record[$languageField]);