‪TYPO3CMS  10.4
RecordProvider.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 
28 
33 {
39  protected ‪$record = [];
40 
46  protected ‪$pageRecord = [];
47 
53  protected ‪$pagePermissions = 0;
54 
58  protected ‪$itemsConfiguration = [
59  'view' => [
60  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.view',
61  'iconIdentifier' => 'actions-view',
62  'callbackAction' => 'viewRecord'
63  ],
64  'edit' => [
65  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.edit',
66  'iconIdentifier' => 'actions-open',
67  'callbackAction' => 'editRecord'
68  ],
69  'new' => [
70  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.new',
71  'iconIdentifier' => 'actions-add',
72  'callbackAction' => 'newRecord'
73  ],
74  'info' => [
75  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.info',
76  'iconIdentifier' => 'actions-document-info',
77  'callbackAction' => 'openInfoPopUp'
78  ],
79  'divider1' => [
80  'type' => 'divider'
81  ],
82  'copy' => [
83  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.copy',
84  'iconIdentifier' => 'actions-edit-copy',
85  'callbackAction' => 'copy'
86  ],
87  'copyRelease' => [
88  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.copy',
89  'iconIdentifier' => 'actions-edit-copy-release',
90  'callbackAction' => 'clipboardRelease'
91  ],
92  'cut' => [
93  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.cut',
94  'iconIdentifier' => 'actions-edit-cut',
95  'callbackAction' => 'cut'
96  ],
97  'cutRelease' => [
98  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.cutrelease',
99  'iconIdentifier' => 'actions-edit-cut-release',
100  'callbackAction' => 'clipboardRelease'
101  ],
102  'pasteAfter' => [
103  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.pasteafter',
104  'iconIdentifier' => 'actions-document-paste-after',
105  'callbackAction' => 'pasteAfter'
106  ],
107  'divider2' => [
108  'type' => 'divider'
109  ],
110  'more' => [
111  'type' => 'submenu',
112  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.more',
113  'iconIdentifier' => '',
114  'callbackAction' => 'openSubmenu',
115  'childItems' => [
116  'newWizard' => [
117  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:CM_newWizard',
118  'iconIdentifier' => 'actions-add',
119  'callbackAction' => 'newContentWizard',
120  ],
121  'openListModule' => [
122  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:CM_db_list',
123  'iconIdentifier' => 'actions-system-list-open',
124  'callbackAction' => 'openListModule',
125  ],
126  ],
127  ],
128  'divider3' => [
129  'type' => 'divider'
130  ],
131  'enable' => [
132  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:enable',
133  'iconIdentifier' => 'actions-edit-unhide',
134  'callbackAction' => 'enableRecord',
135  ],
136  'disable' => [
137  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:disable',
138  'iconIdentifier' => 'actions-edit-hide',
139  'callbackAction' => 'disableRecord',
140  ],
141  'delete' => [
142  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.delete',
143  'iconIdentifier' => 'actions-edit-delete',
144  'callbackAction' => 'deleteRecord',
145  ],
146  'history' => [
147  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf:CM_history',
148  'iconIdentifier' => 'actions-document-history-open',
149  'callbackAction' => 'openHistoryPopUp',
150  ],
151  ];
152 
158  public function ‪canHandle(): bool
159  {
160  if (in_array($this->table, ['sys_file', 'pages'], true)
161  || strpos($this->table, '-drag') !== false) {
162  return false;
163  }
164  return isset(‪$GLOBALS['TCA'][$this->table]);
165  }
166 
170  protected function ‪initialize()
171  {
172  parent::initialize();
173  $this->record = ‪BackendUtility::getRecordWSOL($this->table, (int)$this->identifier);
174  $this->‪initPermissions();
175  }
176 
182  public function ‪getPriority(): int
183  {
184  return 60;
185  }
186 
193  public function ‪addItems(array $items): array
194  {
195  if (!empty($items)) {
196  return $items;
197  }
198  $this->‪initialize();
199  return $this->‪prepareItems($this->itemsConfiguration);
200  }
201 
209  protected function ‪canRender(string $itemName, string $type): bool
210  {
211  if (in_array($type, ['divider', 'submenu'], true)) {
212  return true;
213  }
214  if (in_array($itemName, $this->disabledItems, true)) {
215  return false;
216  }
217  $canRender = false;
218  switch ($itemName) {
219  case 'view':
220  $canRender = $this->‪canBeViewed();
221  break;
222  case 'edit':
223  $canRender = $this->‪canBeEdited();
224  break;
225  case 'new':
226  $canRender = $this->‪canBeNew();
227  break;
228  case 'newWizard':
229  $canRender = $this->‪canOpenNewCEWizard();
230  break;
231  case 'info':
232  $canRender = $this->‪canShowInfo();
233  break;
234  case 'enable':
235  $canRender = $this->‪canBeEnabled();
236  break;
237  case 'disable':
238  $canRender = $this->‪canBeDisabled();
239  break;
240  case 'delete':
241  $canRender = $this->‪canBeDeleted();
242  break;
243  case 'history':
244  $canRender = $this->‪canShowHistory();
245  break;
246  case 'openListModule':
247  $canRender = $this->‪canOpenListModule();
248  break;
249  case 'copy':
250  $canRender = $this->‪canBeCopied();
251  break;
252  case 'copyRelease':
253  $canRender = $this->‪isRecordInClipboard('copy');
254  break;
255  case 'cut':
256  $canRender = $this->‪canBeCut();
257  break;
258  case 'cutRelease':
259  $canRender = $this->‪isRecordInClipboard('cut');
260  break;
261  case 'pasteAfter':
262  $canRender = $this->‪canBePastedAfter();
263  break;
264  }
265  return $canRender;
266  }
267 
271  protected function ‪initPermissions()
272  {
273  $this->pageRecord = ‪BackendUtility::getRecord('pages', $this->record['pid']);
274  $this->pagePermissions = $this->backendUser->calcPerms($this->pageRecord);
275  }
276 
284  protected function ‪hasPagePermission(int $permission): bool
285  {
286  return $this->backendUser->isAdmin() || ($this->pagePermissions & $permission) == $permission;
287  }
288 
295  protected function ‪getAdditionalAttributes(string $itemName): array
296  {
297  $attributes = [];
298  if ($itemName === 'view') {
299  $attributes += $this->‪getViewAdditionalAttributes();
300  }
301  if ($itemName === 'enable' || $itemName === 'disable') {
302  $attributes += $this->‪getEnableDisableAdditionalAttributes();
303  }
304  if ($itemName === 'newWizard' && $this->table === 'tt_content') {
305  $moduleName = ‪BackendUtility::getPagesTSconfig($this->record['pid'])['mod.']['newContentElementWizard.']['override']
306  ?? 'new_content_element_wizard';
307  $urlParameters = [
308  'id' => $this->record['pid'],
309  'sys_language_uid' => $this->record['sys_language_uid'],
310  'colPos' => $this->record['colPos'],
311  'uid_pid' => -$this->record['uid']
312  ];
313  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
314  $url = (string)$uriBuilder->buildUriFromRoute($moduleName, $urlParameters);
315  $attributes += [
316  'data-new-wizard-url' => htmlspecialchars($url),
317  'data-title' => $this->languageService->getLL('newContentElement'),
318  ];
319  }
320  if ($itemName === 'delete') {
321  $attributes += $this->‪getDeleteAdditionalAttributes();
322  }
323  if ($itemName === 'openListModule') {
324  $attributes += [
325  'data-page-uid' => $this->record['pid']
326  ];
327  }
328  if ($itemName === 'pasteAfter') {
329  $attributes += $this->‪getPasteAdditionalAttributes('after');
330  }
331  return $attributes;
332  }
333 
339  protected function ‪getViewAdditionalAttributes(): array
340  {
341  $attributes = [];
342  $viewLink = $this->‪getViewLink();
343  if ($viewLink) {
344  $attributes += [
345  'data-preview-url' => htmlspecialchars($viewLink),
346  ];
347  }
348  return $attributes;
349  }
350 
356  protected function ‪getEnableDisableAdditionalAttributes(): array
357  {
358  return [
359  'data-disable-field' => ‪$GLOBALS['TCA'][‪$this->table]['ctrl']['enablecolumns']['disabled'] ?? ''
360  ];
361  }
362 
369  protected function ‪getPasteAdditionalAttributes(string $type): array
370  {
371  $closeText = $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel');
372  $okText = $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:ok');
373  $attributes = [];
374  if ($this->backendUser->jsConfirmation(‪JsConfirmation::COPY_MOVE_PASTE)) {
375  $selItem = $this->clipboard->getSelectedRecord();
376  $title = $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:clip_paste');
377 
378  $confirmMessage = sprintf(
379  $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:mess.'
380  . ($this->clipboard->currentMode() === 'copy' ? 'copy' : 'move') . '_' . $type),
381  GeneralUtility::fixed_lgd_cs($selItem['_RECORD_TITLE'], $this->backendUser->uc['titleLen']),
382  GeneralUtility::fixed_lgd_cs(‪BackendUtility::getRecordTitle($this->table, $this->record), $this->backendUser->uc['titleLen'])
383  );
384  $attributes += [
385  'data-title' => htmlspecialchars($title),
386  'data-message' => htmlspecialchars($confirmMessage),
387  'data-button-close-text' => htmlspecialchars($closeText),
388  'data-button-ok-text' => htmlspecialchars($okText),
389  ];
390  }
391  return $attributes;
392  }
393 
399  protected function ‪getDeleteAdditionalAttributes(): array
400  {
401  $closeText = $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel');
402  $okText = $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:delete');
403  $attributes = [];
404  if ($this->backendUser->jsConfirmation(‪JsConfirmation::DELETE)) {
405  $recordTitle = GeneralUtility::fixed_lgd_cs(‪BackendUtility::getRecordTitle($this->table, $this->record), $this->backendUser->uc['titleLen']);
406 
407  $title = $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:delete');
408  $confirmMessage = sprintf(
409  $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:mess.delete'),
410  $recordTitle
411  );
412  $confirmMessage .= ‪BackendUtility::referenceCount(
413  $this->table,
414  $this->record['uid'],
415  ' ' . $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.referencesToRecord')
416  );
417  $confirmMessage .= ‪BackendUtility::translationCount(
418  $this->table,
419  $this->record['uid'],
420  ' ' . $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.translationsOfRecord')
421  );
422  $attributes += [
423  'data-title' => htmlspecialchars($title),
424  'data-message' => htmlspecialchars($confirmMessage),
425  'data-button-close-text' => htmlspecialchars($closeText),
426  'data-button-ok-text' => htmlspecialchars($okText),
427  ];
428  }
429  return $attributes;
430  }
431 
437  protected function ‪getPreviewPid(): int
438  {
439  return (int)$this->record['pid'];
440  }
441 
447  protected function ‪getViewLink(): string
448  {
449  $anchorSection = '';
450  $additionalParams = '';
451  if ($this->table === 'tt_content') {
452  $anchorSection = '#c' . $this->record['uid'];
453  $language = (int)$this->record[‪$GLOBALS['TCA']['tt_content']['ctrl']['languageField']];
454  if ($language > 0) {
455  $additionalParams = '&L=' . $language;
456  }
457  }
458 
459  try {
461  $this->‪getPreviewPid(),
462  '',
463  null,
464  $anchorSection,
465  '',
466  $additionalParams
467  );
468  } catch (UnableToLinkToPageException $e) {
469  return '';
470  }
471  }
472 
478  protected function ‪canShowInfo(): bool
479  {
480  return true;
481  }
482 
488  protected function ‪canShowHistory(): bool
489  {
490  $userTsConfig = $this->backendUser->getTSConfig();
491  return (bool)trim($userTsConfig['options.']['showHistory.'][$this->table] ?? $userTsConfig['options.']['showHistory'] ?? '1');
492  }
493 
499  protected function ‪canBeViewed(): bool
500  {
501  return $this->table === 'tt_content' && $this->‪parentPageCanBeViewed();
502  }
503 
509  protected function ‪canBeEdited(): bool
510  {
511  if (isset(‪$GLOBALS['TCA'][$this->table]['ctrl']['readOnly']) && ‪$GLOBALS['TCA'][$this->table]['ctrl']['readOnly']) {
512  return false;
513  }
514  if ($this->backendUser->isAdmin()) {
515  return true;
516  }
517  if (isset(‪$GLOBALS['TCA'][$this->table]['ctrl']['adminOnly']) && ‪$GLOBALS['TCA'][$this->table]['ctrl']['adminOnly']) {
518  return false;
519  }
520 
521  $access = !$this->‪isRecordLocked()
522  && $this->backendUser->check('tables_modify', $this->table)
524  && $this->backendUser->recordEditAccessInternals($this->table, $this->record);
525  return $access;
526  }
527 
533  protected function ‪canBeNew(): bool
534  {
535  return $this->‪canBeEdited() && !$this->‪isRecordATranslation();
536  }
537 
543  protected function ‪isDeletionDisabledInTS(): bool
544  {
545  return (bool)\trim(
546  $this->backendUser->getTSConfig()['options.']['disableDelete.'][$this->table]
547  ?? $this->backendUser->getTSConfig()['options.']['disableDelete']
548  ?? ''
549  );
550  }
551 
557  protected function ‪canBeDeleted(): bool
558  {
559  return !$this->‪isDeletionDisabledInTS()
560  && !$this->‪isRecordCurrentBackendUser()
561  && $this->‪canBeEdited();
562  }
563 
569  protected function ‪canBeEnabled(): bool
570  {
571  return $this->‪hasDisableColumnWithValue(1) && $this->‪canBeEdited();
572  }
573 
579  protected function ‪canBeDisabled(): bool
580  {
581  return $this->‪hasDisableColumnWithValue(0)
582  && !$this->‪isRecordCurrentBackendUser()
583  && $this->‪canBeEdited();
584  }
585 
591  protected function ‪canOpenNewCEWizard(): bool
592  {
593  return $this->table === 'tt_content'
594  && (bool)(‪BackendUtility::getPagesTSconfig($this->record['pid'])['mod.']['web_layout.']['disableNewContentElementWizard'] ?? true)
595  && $this->‪canBeEdited() && !$this->‪isRecordATranslation();
596  }
597 
601  protected function ‪canOpenListModule(): bool
602  {
603  return $this->backendUser->check('modules', 'web_list');
604  }
605 
609  protected function ‪canBeCopied(): bool
610  {
611  return !$this->‪isRecordInClipboard('copy')
612  && !$this->‪isRecordATranslation();
613  }
614 
618  protected function ‪canBeCut(): bool
619  {
620  return !$this->‪isRecordInClipboard('cut')
621  && $this->‪canBeEdited()
622  && !$this->‪isRecordATranslation();
623  }
624 
630  protected function ‪canBePastedAfter(): bool
631  {
632  $clipboardElementCount = count($this->clipboard->elFromTable($this->table));
633 
634  return $clipboardElementCount
635  && $this->backendUser->check('tables_modify', $this->table)
637  }
638 
646  protected function ‪hasDisableColumnWithValue(int $value): bool
647  {
648  if (isset(‪$GLOBALS['TCA'][$this->table]['ctrl']['enablecolumns']['disabled'])) {
649  $hiddenFieldName = ‪$GLOBALS['TCA'][‪$this->table]['ctrl']['enablecolumns']['disabled'];
650  if (
651  $hiddenFieldName !== '' && !empty(‪$GLOBALS['TCA'][$this->table]['columns'][$hiddenFieldName])
652  && (
653  empty(‪$GLOBALS['TCA'][$this->table]['columns'][$hiddenFieldName]['exclude'])
654  || $this->backendUser->check('non_exclude_fields', $this->table . ':' . $hiddenFieldName)
655  )
656  ) {
657  return (int)$this->record[$hiddenFieldName] === (int)$value;
658  }
659  }
660  return false;
661  }
662 
668  protected function ‪isRecordLocked(): bool
669  {
670  return (int)$this->pageRecord['editlock'] === 1
671  || isset(‪$GLOBALS['TCA'][$this->table]['ctrl']['editlock'])
672  && (int)$this->record[‪$GLOBALS['TCA'][$this->table]['ctrl']['editlock']] === 1;
673  }
674 
680  protected function ‪isDeletePlaceholder(): bool
681  {
682  if (!isset($this->record['t3ver_state'])) {
683  return false;
684  }
685  return ‪VersionState::cast($this->record['t3ver_state'])->equals(‪VersionState::DELETE_PLACEHOLDER);
686  }
687 
694  protected function ‪isRecordInClipboard(string $mode = ''): bool
695  {
696  $isSelected = '';
697  if ($this->clipboard->current === 'normal') {
698  $isSelected = $this->clipboard->isSelected($this->table, $this->record['uid']);
699  }
700  return $mode === '' ? !empty($isSelected) : $isSelected === $mode;
701  }
702 
708  protected function ‪isRecordATranslation(): bool
709  {
710  return ‪BackendUtility::isTableLocalizable($this->table) && (int)$this->record[‪$GLOBALS['TCA'][$this->table]['ctrl']['transOrigPointerField']] !== 0;
711  }
712 
718  protected function ‪isRecordCurrentBackendUser(): bool
719  {
720  return $this->table === 'be_users'
721  && (int)($this->record['uid'] ?? 0) === (int)$this->backendUser->user[$this->backendUser->userid_column];
722  }
723 
729  protected function ‪parentPageCanBeViewed(): bool
730  {
731  if (!isset($this->pageRecord['uid']) || !($this->pageRecord['doktype'] ?? false)) {
732  // In case parent page record is invalid, the element can not be viewed
733  return false;
734  }
735 
736  // Finally, we check whether the parent page has a "no view doktype" assigned
737  return !in_array((int)$this->pageRecord['doktype'], [
741  ], true);
742  }
743 
747  protected function ‪getIdentifier(): string
748  {
749  return $this->record['uid'];
750  }
751 }
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\$itemsConfiguration
‪array $itemsConfiguration
Definition: RecordProvider.php:54
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBePastedAfter
‪bool canBePastedAfter()
Definition: RecordProvider.php:626
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeCopied
‪bool canBeCopied()
Definition: RecordProvider.php:605
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getEnableDisableAdditionalAttributes
‪array getEnableDisableAdditionalAttributes()
Definition: RecordProvider.php:352
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeDeleted
‪bool canBeDeleted()
Definition: RecordProvider.php:553
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\isRecordCurrentBackendUser
‪bool isRecordCurrentBackendUser()
Definition: RecordProvider.php:714
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canOpenNewCEWizard
‪bool canOpenNewCEWizard()
Definition: RecordProvider.php:587
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeCut
‪bool canBeCut()
Definition: RecordProvider.php:614
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canShowHistory
‪bool canShowHistory()
Definition: RecordProvider.php:484
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\$record
‪array $record
Definition: RecordProvider.php:38
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeDisabled
‪bool canBeDisabled()
Definition: RecordProvider.php:575
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\isRecordInClipboard
‪bool isRecordInClipboard(string $mode='')
Definition: RecordProvider.php:690
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider\$table
‪string $table
Definition: AbstractProvider.php:63
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider\prepareItems
‪array prepareItems(array $itemsConfiguration)
Definition: AbstractProvider.php:171
‪TYPO3\CMS\Core\Versioning\VersionState\DELETE_PLACEHOLDER
‪const DELETE_PLACEHOLDER
Definition: VersionState.php:55
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider
Definition: AbstractProvider.php:31
‪TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\COPY_MOVE_PASTE
‪const COPY_MOVE_PASTE
Definition: JsConfirmation.php:34
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getViewAdditionalAttributes
‪array getViewAdditionalAttributes()
Definition: RecordProvider.php:335
‪TYPO3\CMS\Backend\Utility\BackendUtility\getPreviewUrl
‪static string getPreviewUrl( $pageUid, $backPath='', $rootLine=null, $anchorSection='', $alternativeUrl='', $additionalGetVars='', &$switchFocus=true)
Definition: BackendUtility.php:2403
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeNew
‪bool canBeNew()
Definition: RecordProvider.php:529
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getViewLink
‪string getViewLink()
Definition: RecordProvider.php:443
‪TYPO3\CMS\Core\Type\Bitmask\Permission
Definition: Permission.php:24
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\isDeletePlaceholder
‪bool isDeletePlaceholder()
Definition: RecordProvider.php:676
‪TYPO3\CMS\Backend\Utility\BackendUtility\translationCount
‪static string translationCount($table, $ref, $msg='')
Definition: BackendUtility.php:3361
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\hasDisableColumnWithValue
‪bool hasDisableColumnWithValue(int $value)
Definition: RecordProvider.php:642
‪TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\DELETE
‪const DELETE
Definition: JsConfirmation.php:39
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getPreviewPid
‪int getPreviewPid()
Definition: RecordProvider.php:433
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\parentPageCanBeViewed
‪bool parentPageCanBeViewed()
Definition: RecordProvider.php:725
‪TYPO3\CMS\Core\Type\Enumeration\cast
‪static static cast($value)
Definition: Enumeration.php:186
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canHandle
‪bool canHandle()
Definition: RecordProvider.php:154
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeViewed
‪bool canBeViewed()
Definition: RecordProvider.php:495
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getPasteAdditionalAttributes
‪array getPasteAdditionalAttributes(string $type)
Definition: RecordProvider.php:365
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:38
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getPriority
‪int getPriority()
Definition: RecordProvider.php:178
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getAdditionalAttributes
‪array getAdditionalAttributes(string $itemName)
Definition: RecordProvider.php:291
‪TYPO3\CMS\Backend\Utility\BackendUtility\getPagesTSconfig
‪static array getPagesTSconfig($id)
Definition: BackendUtility.php:698
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle
‪static string getRecordTitle($table, $row, $prep=false, $forceResult=true)
Definition: BackendUtility.php:1541
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SPACER
‪const DOKTYPE_SPACER
Definition: PageRepository.php:108
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\isDeletionDisabledInTS
‪bool isDeletionDisabledInTS()
Definition: RecordProvider.php:539
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\initialize
‪initialize()
Definition: RecordProvider.php:166
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeEdited
‪bool canBeEdited()
Definition: RecordProvider.php:505
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_SYSFOLDER
‪const DOKTYPE_SYSFOLDER
Definition: PageRepository.php:109
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canShowInfo
‪bool canShowInfo()
Definition: RecordProvider.php:474
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:75
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL
‪static array getRecordWSOL( $table, $uid, $fields=' *', $where='', $useDeleteClause=true, $unsetMovePointers=false)
Definition: BackendUtility.php:139
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecord
‪static array null getRecord($table, $uid, $fields=' *', $where='', $useDeleteClause=true)
Definition: BackendUtility.php:95
‪TYPO3\CMS\Core\Versioning\VersionState
Definition: VersionState.php:24
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\$pageRecord
‪array $pageRecord
Definition: RecordProvider.php:44
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canOpenListModule
‪bool canOpenListModule()
Definition: RecordProvider.php:597
‪TYPO3\CMS\Backend\Utility\BackendUtility\isTableLocalizable
‪static bool isTableLocalizable($table)
Definition: BackendUtility.php:578
‪TYPO3\CMS\Core\Type\Bitmask\Permission\CONTENT_EDIT
‪const CONTENT_EDIT
Definition: Permission.php:53
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider
Definition: RecordProvider.php:33
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getDeleteAdditionalAttributes
‪array getDeleteAdditionalAttributes()
Definition: RecordProvider.php:395
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\hasPagePermission
‪bool hasPagePermission(int $permission)
Definition: RecordProvider.php:280
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\getIdentifier
‪string getIdentifier()
Definition: RecordProvider.php:743
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\isRecordATranslation
‪bool isRecordATranslation()
Definition: RecordProvider.php:704
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\initPermissions
‪initPermissions()
Definition: RecordProvider.php:267
‪TYPO3\CMS\Core\Domain\Repository\PageRepository
Definition: PageRepository.php:52
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\isRecordLocked
‪bool isRecordLocked()
Definition: RecordProvider.php:664
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canRender
‪bool canRender(string $itemName, string $type)
Definition: RecordProvider.php:205
‪TYPO3\CMS\Core\Type\Bitmask\JsConfirmation
Definition: JsConfirmation.php:25
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\$pagePermissions
‪int $pagePermissions
Definition: RecordProvider.php:50
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders
Definition: AbstractProvider.php:18
‪TYPO3\CMS\Core\Domain\Repository\PageRepository\DOKTYPE_RECYCLER
‪const DOKTYPE_RECYCLER
Definition: PageRepository.php:110
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\addItems
‪array addItems(array $items)
Definition: RecordProvider.php:189
‪TYPO3\CMS\Backend\Utility\BackendUtility\referenceCount
‪static string int referenceCount($table, $ref, $msg='', $count=null)
Definition: BackendUtility.php:3311
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\RecordProvider\canBeEnabled
‪bool canBeEnabled()
Definition: RecordProvider.php:565