‪TYPO3CMS  11.5
Clipboard.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\ServerRequestInterface;
22 use TYPO3\CMS\Backend\Utility\BackendUtility;
31 use TYPO3\CMS\Core\Page\PageRenderer;
42 
49 {
71  public array ‪$clipData = [];
72 
73  public bool ‪$changed = false;
74 
75  public string ‪$current = '';
76 
77  public bool ‪$lockToNormal = false;
78 
79  public int ‪$numberOfPads = 3;
80 
84 
85  protected ?ServerRequestInterface ‪$request = null;
86 
88  {
89  $this->iconFactory = ‪$iconFactory;
90  $this->uriBuilder = ‪$uriBuilder;
91  $this->resourceFactory = ‪$resourceFactory;
92  }
93 
94  /*****************************************
95  *
96  * Initialize
97  *
98  ****************************************/
102  public function ‪initializeClipboard(?ServerRequestInterface ‪$request = null): void
103  {
104  // Initialize the request
105  // @todo: Clipboard does two things: It is a repository to find out which records
106  // are in the clipboard, and it is a class to help with rendering the
107  // clipboard. $request is optional and only used in rendering.
108  // It would be better to split these two aspects into single classes.
109  $this->request = ‪$request ?? ‪$GLOBALS['TYPO3_REQUEST'] ?? null;
110 
111  $userTsConfig = $this->‪getBackendUser()->‪getTSConfig();
112  // Get data
113  $clipData = $this->‪getBackendUser()->‪getModuleData('clipboard', !empty($userTsConfig['options.']['saveClipboard']) ? '' : 'ses') ?: [];
114  ‪$clipData += ['normal' => []];
115  $this->numberOfPads = ‪MathUtility::forceIntegerInRange((int)($userTsConfig['options.']['clipboardNumberPads'] ?? 3), 0, 20);
116  // Resets/reinstates the clipboard pads
117  $this->clipData['normal'] = is_array(‪$clipData['normal']) ? ‪$clipData['normal'] : [];
118  for ($a = 1; $a <= ‪$this->numberOfPads; $a++) {
119  $index = 'tab_' . $a;
120  $this->clipData[$index] = is_iterable(‪$clipData[$index] ?? null) ? ‪$clipData[$index] : [];
121  }
122  // Setting the current pad pointer ($this->current))
123  ‪$current = (string)(‪$clipData['current'] ?? '');
124  $this->current = isset($this->clipData[‪$current]) ? ‪$current : 'normal';
125  $this->clipData['current'] = ‪$this->current;
126  }
127 
133  public function ‪lockToNormal(): void
134  {
135  $this->‪lockToNormal = true;
136  $this->current = 'normal';
137  }
138 
150  public function ‪setCmd(array $cmd): void
151  {
152  $cmd['el'] ??= [];
153  $cmd['el'] = is_iterable($cmd['el']) ? $cmd['el'] : [];
154  foreach ($cmd['el'] as $key => $value) {
155  if ($this->current === 'normal') {
156  unset($this->clipData['normal']);
157  }
158  if ($value) {
159  $this->clipData[‪$this->current]['el'][$key] = $value;
160  } else {
161  $this->‪removeElement((string)$key);
162  }
163  $this->changed = true;
164  }
165  // Change clipboard pad (if not locked to normal)
166  if ($cmd['setP'] ?? false) {
167  $this->‪setCurrentPad((string)$cmd['setP']);
168  }
169  // Remove element (value = item ident: DB; '[tablename]|[uid]' FILE: '_FILE|[md5 hash of path]'
170  if ($cmd['remove'] ?? false) {
171  $this->‪removeElement((string)$cmd['remove']);
172  $this->changed = true;
173  }
174  // Remove all on current pad (value = pad-ident)
175  if ($cmd['removeAll'] ?? false) {
176  $this->clipData[$cmd['removeAll']] = [];
177  $this->changed = true;
178  }
179  // Set copy mode of the tab
180  if (isset($cmd['setCopyMode'])) {
181  $this->clipData[‪$this->current]['mode'] = $cmd['setCopyMode'] ? 'copy' : '';
182  $this->changed = true;
183  }
184  }
185 
191  public function ‪setCurrentPad(string $padIdentifier): void
192  {
193  // Change clipboard pad (if not locked to normal)
194  if (!$this->‪lockToNormal && $this->current !== $padIdentifier) {
195  if (isset($this->clipData[$padIdentifier])) {
196  $this->clipData['current'] = ($this->current = $padIdentifier);
197  }
198  if ($this->current !== 'normal' || !$this->‪isElements()) {
199  $this->clipData[‪$this->current]['mode'] = '';
200  }
201  // Setting mode to default (move) if no items on it or if not 'normal'
202  $this->changed = true;
203  }
204  }
205 
210  public function ‪endClipboard(): void
211  {
212  if ($this->changed) {
213  $this->‪saveClipboard();
214  }
215  $this->changed = false;
216  }
217 
226  public function ‪cleanUpCBC(array $CBarr, string $table, bool $removeDeselected = false): array
227  {
228  foreach ($CBarr as $reference => $value) {
229  $referenceTable = (string)(explode('|', $reference)[0] ?? '');
230  if ($referenceTable !== $table || ($removeDeselected && !$value)) {
231  unset($CBarr[$reference]);
232  }
233  }
234  return $CBarr;
235  }
236 
240  public function ‪printClipboard(string $table = ''): string
241  {
242  $attributes = [
243  'table' => $table,
244  ];
245  GeneralUtility::makeInstance(PageRenderer::class)->loadRequireJsModule('TYPO3/CMS/Backend/ClipboardPanel');
246  return '<typo3-backend-clipboard-panel ' . GeneralUtility::implodeAttributes($attributes, true) . '></typo3-backend-clipboard-panel>';
247  }
248 
249  public function ‪getClipboardData(string $table = ''): array
250  {
251  $lang = $this->‪getLanguageService();
252 
253  $clipboardData = [
254  'current' => ‪$this->current,
255  'copyMode' => $this->‪currentMode(),
256  'elementCount' => count($this->‪elFromTable($table)),
257  ];
258 
259  // Initialize tabs by adding the "normal" tab
260  $tabs = [
261  [
262  'identifier' => 'normal',
263  'info' => $this->‪getTabInfo('normal', $table),
264  'title' => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.normal'),
265  'description' => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.normal-description'),
266  'items' => $this->current === 'normal' ? $this->‪getTabItems('normal', $table) : [],
267  ],
268  ];
269  // Add numeric tabs
270  for ($a = 1; $a <= ‪$this->numberOfPads; $a++) {
271  $tabs[] = [
272  'identifier' => 'tab_' . $a,
273  'info' => $this->‪getTabInfo('tab_' . $a, $table),
274  'title' => sprintf($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.cliptabs-name'), (string)$a),
275  'description' => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.cliptabs-description'),
276  'items' => $this->current === 'tab_' . $a ? $this->‪getTabItems('tab_' . $a, $table) : [],
277  ];
278  }
279  // Add tabs to clipboard Data
280  $clipboardData['tabs'] = $tabs;
281 
282  return $clipboardData;
283  }
284 
291  protected function ‪getTabItems(string $padIdentifier, string $currentTable): array
292  {
293  if (!is_array($this->clipData[$padIdentifier]['el'] ?? false)) {
294  return [];
295  }
296 
297  $records = [];
298  foreach ($this->clipData[$padIdentifier]['el'] as $reference => $value) {
299  if (!$value) {
300  // Skip element if empty value
301  continue;
302  }
303  [$table, $uid] = explode('|', $reference);
304  // Rendering files/directories on the clipboard
305  if ($table === '_FILE') {
306  $fileObject = $this->resourceFactory->retrieveFileOrFolderObject($value);
307  if ($fileObject) {
308  $thumb = '';
309  $folder = $fileObject instanceof ‪Folder;
310  $size = $folder ? '' : '(' . GeneralUtility::formatSize((int)$fileObject->getSize()) . 'bytes)';
312  if (!$folder && ($fileObject->isImage() || $fileObject->isMediaFile())) {
313  $processedFile = $fileObject->process(
315  [
316  'width' => 64,
317  'height' => 64,
318  ]
319  );
320 
321  $thumb = '<img src="' . htmlspecialchars($processedFile->getPublicUrl() ?? '') . '" ' .
322  'width="' . htmlspecialchars((string)$processedFile->getProperty('width')) . '" ' .
323  'height="' . htmlspecialchars((string)$processedFile->getProperty('height')) . '" ' .
324  'title="' . htmlspecialchars($processedFile->getName()) . '" alt="" />';
325  }
326  $linkItemText = GeneralUtility::fixed_lgd_cs($fileObject->getName(), (int)($this->getBackendUser()->uc['titleLen'] ?? 0));
327  $combinedIdentifier = ($parentFolder = $fileObject->getParentFolder()) instanceof ‪Folder ? $parentFolder->‪getCombinedIdentifier() : '';
328  $filesRequested = $currentTable === '_FILE';
329  $records[] = [
330  'identifier' => '_FILE|' . md5($value),
331  'icon' => '<span title="' . htmlspecialchars($fileObject->getName() . ' ' . $size) . '">' . $this->iconFactory->getIconForResource(
332  $fileObject,
334  )->render() . '</span>',
335  'title' => $this->‪linkItemText(htmlspecialchars($linkItemText), $combinedIdentifier, $filesRequested),
336  'thumb' => $thumb,
337  'infoDataDispatch' => [
338  'action' => 'TYPO3.InfoWindow.showItem',
339  'args' => GeneralUtility::jsonEncodeForHtmlAttribute([$table, $value], false),
340  ],
341  ];
342  } else {
343  // If the file did not exist (or is illegal) then it is removed from the clipboard immediately:
344  unset($this->clipData[$padIdentifier]['el'][$reference]);
345  $this->changed = true;
346  }
347  } else {
348  // Rendering records:
349  $record = BackendUtility::getRecordWSOL($table, (int)$uid);
350  if (is_array($record)) {
351  $isRequestedTable = $currentTable !== '_FILE';
352  $records[] = [
353  'identifier' => $table . '|' . $uid,
354  'icon' => $this->iconFactory->getIconForRecord($table, $record, ‪Icon::SIZE_SMALL)->render(),
355  'title' => $this->‪linkItemText(htmlspecialchars(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle(
356  $table,
357  $record
358  ), $this->‪getBackendUser()->uc['titleLen'])), $record, $isRequestedTable),
359  'infoDataDispatch' => [
360  'action' => 'TYPO3.InfoWindow.showItem',
361  'args' => GeneralUtility::jsonEncodeForHtmlAttribute([$table, (int)$uid], false),
362  ],
363  ];
364 
365  $localizationData = $this->‪getLocalizations($table, $record, $isRequestedTable);
366  if (!empty($localizationData)) {
367  $records = array_merge($records, $localizationData);
368  }
369  } else {
370  unset($this->clipData[$padIdentifier]['el'][$reference]);
371  $this->changed = true;
372  }
373  }
374  }
375  $this->‪endClipboard();
376  return $records;
377  }
378 
384  public function ‪hasElements(): bool
385  {
386  foreach ($this->clipData as $data) {
387  if (isset($data['el']) && is_array($data['el']) && !empty($data['el'])) {
388  return true;
389  }
390  }
391  return false;
392  }
393 
402  protected function ‪getLocalizations(string $table, array $parentRecord, bool $isRequestedTable): array
403  {
404  if (!BackendUtility::isTableLocalizable($table)) {
405  return [];
406  }
407 
408  $records = [];
409  $tcaCtrl = ‪$GLOBALS['TCA'][$table]['ctrl'];
410  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
411  $queryBuilder->getRestrictions()
412  ->removeAll()
413  ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
414 
415  $queryBuilder
416  ->select('*')
417  ->from($table)
418  ->where(
419  $queryBuilder->expr()->eq(
420  $tcaCtrl['transOrigPointerField'],
421  $queryBuilder->createNamedParameter((int)$parentRecord['uid'], ‪Connection::PARAM_INT)
422  ),
423  $queryBuilder->expr()->neq(
424  $tcaCtrl['languageField'],
425  $queryBuilder->createNamedParameter(0, ‪Connection::PARAM_INT)
426  ),
427  $queryBuilder->expr()->gt(
428  'pid',
429  $queryBuilder->createNamedParameter(-1, ‪Connection::PARAM_INT)
430  )
431  )
432  ->orderBy($tcaCtrl['languageField']);
433 
434  if (BackendUtility::isTableWorkspaceEnabled($table)) {
435  $queryBuilder->getRestrictions()->add(
436  GeneralUtility::makeInstance(WorkspaceRestriction::class, $this->‪getBackendUser()->workspace)
437  );
438  }
439 
440  foreach ($queryBuilder->executeQuery()->fetchAllAssociative() as $record) {
441  $title = htmlspecialchars(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $record), $this->‪getBackendUser()->uc['titleLen']));
442  if (!$isRequestedTable) {
443  // In case the current table is not the requested table, e.g. "_FILE", wrap title in "muted" style
444  $title = '<span class="text-muted">' . $title . '</span>';
445  }
446  $records[] = [
447  'icon' => $this->iconFactory->getIconForRecord($table, $record, ‪Icon::SIZE_SMALL)->render(),
448  'title' => $title,
449  'infoDataDispatch' => [
450  'action' => 'TYPO3.InfoWindow.showItem',
451  'args' => GeneralUtility::jsonEncodeForHtmlAttribute([$table, (int)$record['uid']], false),
452  ],
453  ];
454  }
455 
456  return $records;
457  }
458 
469  protected function ‪getTabInfo(string $padIdentifier, string $table = ''): string
470  {
471  $el = count($this->‪elFromTable($table, $padIdentifier));
472  if (!$el) {
473  return '';
474  }
475  $modeLabel = ($this->clipData['normal']['mode'] ?? '') === 'copy' ? $this->‪clipboardLabel('cm.copy') : $this->‪clipboardLabel('cm.cut');
476  return ' (' . ($padIdentifier === 'normal' ? $modeLabel : htmlspecialchars((string)$el)) . ')';
477  }
478 
488  protected function ‪linkItemText(string $itemText, $reference, bool $isRequestedTable): string
489  {
490  if (is_array($reference)) {
491  if ($isRequestedTable) {
492  // Wrap in link to corresponding page in recordlist in case current requested table matches
493  $itemText = '<a href="' . htmlspecialchars((string)$this->uriBuilder->buildUriFromRoute('web_list', ['id' => $reference['pid']])) . '">' . $itemText . '</a>';
494  } else {
495  $itemText = '<span class="text-muted">' . $itemText . '</span>';
496  }
497  } elseif (is_string($reference)) {
498  if ($isRequestedTable && ‪ExtensionManagementUtility::isLoaded('filelist')) {
499  // Wrap in link to the files folder in case current requested table matches and filelist is loaded
500  $itemText = '<a href="' . htmlspecialchars((string)$this->uriBuilder->buildUriFromRoute('file_FilelistList', ['id' => $reference])) . '">' . $itemText . '</a>';
501  } else {
502  $itemText = '<span class="text-muted">' . $itemText . '</span>';
503  }
504  }
505  return $itemText;
506  }
507 
517  public function ‪selUrlDB(string $table, int $uid, bool $copy = false, bool $deselect = false): string
518  {
519  return $this->‪buildUrl(['CB' => [
520  'el' => [
521  $table . '|' . $uid => $deselect ? 0 : 1,
522  ],
523  'setCopyMode' => (int)$copy,
524  ]]);
525  }
526 
535  public function ‪selUrlFile(string $path, bool $copy = false, bool $deselect = false): string
536  {
537  return $this->‪buildUrl(['CB' => [
538  'el' => [
539  '_FILE|' . md5($path) => $deselect ? '' : $path,
540  ],
541  'setCopyMode' => (int)$copy,
542  ]]);
543  }
544 
557  public function ‪pasteUrl(string $table, $identifier, bool $setRedirect = true, array $update = null): string
558  {
559  $urlParameters = [
560  'CB' => [
561  'paste' => $table . '|' . $identifier,
562  'pad' => ‪$this->current,
563  ],
564  ];
565  if ($setRedirect) {
566  $urlParameters['redirect'] = $this->‪buildUrl(['CB' => []]);
567  }
568  if (is_array($update)) {
569  $urlParameters['CB']['update'] = $update;
570  }
571  return (string)$this->uriBuilder->buildUriFromRoute($table === '_FILE' ? 'tce_file' : 'tce_db', $urlParameters);
572  }
573 
584  public function ‪confirmMsgText(
585  string $table,
586  $reference,
587  string $type,
588  array $selectedElements,
589  string $columnLabel = ''
590  ): string {
591  if (!$this->‪getBackendUser()->jsConfirmation(‪JsConfirmation::COPY_MOVE_PASTE)) {
592  return '';
593  }
594 
595  $labelKey = 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:mess.'
596  . ($this->‪currentMode() === 'copy' ? 'copy' : 'move')
597  . ($this->current === 'normal' ? '' : 'cb') . '_' . $type;
598  $confirmationMessage = $this->‪getLanguageService()->‪sL($labelKey . ($columnLabel ? '_colPos' : ''));
599 
600  if ($table === '_FILE' && is_string($reference)) {
601  $recordTitle = ‪PathUtility::basename($reference);
602  if ($this->current === 'normal') {
603  $selectedItem = reset($selectedElements);
604  $selectedRecordTitle = ‪PathUtility::basename($selectedItem);
605  } else {
606  $selectedRecordTitle = count($selectedElements);
607  }
608  } else {
609  $recordTitle = $table === 'pages' && !is_array($reference)
610  ? ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']
611  : BackendUtility::getRecordTitle($table, $reference);
612  if ($this->current === 'normal') {
613  $selectedItem = $this->‪getSelectedRecord();
614  $selectedRecordTitle = $selectedItem['_RECORD_TITLE'];
615  } else {
616  $selectedRecordTitle = count($selectedElements);
617  }
618  }
619  // @TODO
620  // This can get removed as soon as the "_colPos" label is translated
621  // into all available locallang languages.
622  if (!$confirmationMessage && $columnLabel) {
623  $recordTitle .= ' | ' . $columnLabel;
624  $confirmationMessage = $this->‪getLanguageService()->‪sL($labelKey);
625  }
626 
627  return sprintf(
628  $confirmationMessage,
629  GeneralUtility::fixed_lgd_cs($selectedRecordTitle, 30),
630  GeneralUtility::fixed_lgd_cs($recordTitle, 30),
631  GeneralUtility::fixed_lgd_cs($columnLabel, 30)
632  );
633  }
634 
641  protected function ‪clipboardLabel(string $key): string
642  {
643  return htmlspecialchars($this->‪getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:' . $key));
644  }
645 
646  /*****************************************
647  *
648  * Helper functions
649  *
650  ****************************************/
656  public function ‪removeElement(string $elementKey): void
657  {
658  unset($this->clipData[$this->current]['el'][$elementKey]);
659  $this->changed = true;
660  }
661 
666  protected function ‪saveClipboard(): void
667  {
668  $this->‪getBackendUser()->‪pushModuleData('clipboard', $this->clipData);
669  }
670 
676  public function ‪currentMode(): string
677  {
678  return ($this->clipData[$this->current]['mode'] ?? '') === 'copy' ? 'copy' : 'cut';
679  }
680 
685  public function ‪cleanCurrent(): void
686  {
687  if (!is_array($this->clipData[$this->current]['el'] ?? false)) {
688  return;
689  }
690 
691  foreach ($this->clipData[$this->current]['el'] as $reference => $value) {
692  [$table, $uid] = explode('|', $reference);
693  if ($table !== '_FILE') {
694  if (!$value || !is_array(BackendUtility::getRecord($table, (int)$uid, 'uid'))) {
695  unset($this->clipData[$this->current]['el'][$reference]);
696  $this->changed = true;
697  }
698  } elseif (!$value) {
699  unset($this->clipData[$this->current]['el'][$reference]);
700  $this->changed = true;
701  } else {
702  try {
703  $this->resourceFactory->retrieveFileOrFolderObject($value);
704  } catch (‪ResourceDoesNotExistException $e) {
705  // The file has been deleted in the meantime, so just remove it silently
706  unset($this->clipData[$this->current]['el'][$reference]);
707  }
708  }
709  }
710  }
711 
719  public function ‪elFromTable(string $matchTable = '', string $padIdentifier = ''): array
720  {
721  $padIdentifier = $padIdentifier ?: ‪$this->current;
722 
723  if (!is_array($this->clipData[$padIdentifier]['el'] ?? false)) {
724  return [];
725  }
726 
727  $elements = [];
728  foreach ($this->clipData[$padIdentifier]['el'] as $reference => $value) {
729  if (!$value) {
730  continue;
731  }
732  [$table, $uid] = explode('|', $reference);
733  if ($table !== '_FILE') {
734  if ((!$matchTable || $table === $matchTable) && (‪$GLOBALS['TCA'][$table] ?? false)) {
735  $elements[$reference] = $padIdentifier === 'normal' ? $value : $uid;
736  }
737  } elseif ($table === $matchTable) {
738  $elements[$reference] = $value;
739  }
740  }
741  return $elements;
742  }
743 
753  public function ‪isSelected(string $table, $identifier): string
754  {
755  $key = $table . '|' . $identifier;
756  $mode = $this->current === 'normal' ? $this->‪currentMode() : 'any';
757  return !empty($this->clipData[$this->current]['el'][$key]) ? $mode : '';
758  }
759 
766  public function ‪getSelectedRecord(): array
767  {
768  $elements = $this->‪elFromTable();
769  reset($elements);
770  [$table, $uid] = explode('|', (string)key($elements));
771  if (!$this->‪isSelected($table, (int)$uid)) {
772  return [];
773  }
774  $selectedRecord = BackendUtility::getRecordWSOL($table, (int)$uid);
775  $selectedRecord['_RECORD_TITLE'] = BackendUtility::getRecordTitle($table, $selectedRecord);
776  return $selectedRecord;
777  }
778 
784  protected function ‪isElements(): bool
785  {
786  return is_array($this->clipData[$this->current]['el'] ?? null) && !empty($this->clipData[$this->current]['el']);
787  }
788 
795  {
796  return ‪$GLOBALS['LANG'];
797  }
798 
805  {
806  return ‪$GLOBALS['BE_USER'];
807  }
808 
816  protected function ‪buildUrl(array $parameters = []): string
817  {
818  if ($this->request === null) {
819  throw new \RuntimeException(
820  'Request object must be set to generate clipboard URL\'s',
821  1633604720
822  );
823  }
824  return (string)$this->uriBuilder->buildUriFromRoute(
825  $this->request->getAttribute('route')->getOption('_identifier'),
826  array_replace($this->request->getQueryParams(), $parameters)
827  );
828  }
829 }
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:30
‪TYPO3\CMS\Core\Resource\ProcessedFile\CONTEXT_IMAGEPREVIEW
‪const CONTEXT_IMAGEPREVIEW
Definition: ProcessedFile.php:53
‪TYPO3\CMS\Backend\Clipboard\Clipboard\getSelectedRecord
‪array getSelectedRecord()
Definition: Clipboard.php:766
‪TYPO3\CMS\Core\Utility\PathUtility
Definition: PathUtility.php:25
‪TYPO3\CMS\Core\Database\Connection\PARAM_INT
‪const PARAM_INT
Definition: Connection.php:49
‪TYPO3\CMS\Backend\Clipboard\Clipboard\selUrlDB
‪string selUrlDB(string $table, int $uid, bool $copy=false, bool $deselect=false)
Definition: Clipboard.php:517
‪TYPO3\CMS\Backend\Clipboard\Clipboard
Definition: Clipboard.php:49
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Backend\Clipboard\Clipboard\isElements
‪bool isElements()
Definition: Clipboard.php:784
‪TYPO3\CMS\Backend\Clipboard\Clipboard\$numberOfPads
‪int $numberOfPads
Definition: Clipboard.php:79
‪TYPO3\CMS\Backend\Clipboard\Clipboard\linkItemText
‪string linkItemText(string $itemText, $reference, bool $isRequestedTable)
Definition: Clipboard.php:488
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getTSConfig
‪array getTSConfig()
Definition: BackendUserAuthentication.php:1000
‪TYPO3\CMS\Backend\Clipboard\Clipboard\$changed
‪bool $changed
Definition: Clipboard.php:73
‪TYPO3\CMS\Backend\Clipboard\Clipboard\getTabItems
‪array getTabItems(string $padIdentifier, string $currentTable)
Definition: Clipboard.php:291
‪TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange
‪static int forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
Definition: MathUtility.php:32
‪TYPO3\CMS\Backend\Clipboard\Clipboard\lockToNormal
‪lockToNormal()
Definition: Clipboard.php:133
‪TYPO3\CMS\Backend\Clipboard\Clipboard\$lockToNormal
‪bool $lockToNormal
Definition: Clipboard.php:77
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:34
‪TYPO3\CMS\Backend\Clipboard\Clipboard\$resourceFactory
‪ResourceFactory $resourceFactory
Definition: Clipboard.php:83
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:161
‪TYPO3\CMS\Backend\Clipboard\Clipboard\$uriBuilder
‪UriBuilder $uriBuilder
Definition: Clipboard.php:82
‪TYPO3\CMS\Core\Type\Bitmask\JsConfirmation\COPY_MOVE_PASTE
‪const COPY_MOVE_PASTE
Definition: JsConfirmation.php:34
‪TYPO3\CMS\Core\Utility\PathUtility\basename
‪static string basename($path)
Definition: PathUtility.php:226
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:43
‪TYPO3\CMS\Backend\Clipboard\Clipboard\isSelected
‪string isSelected(string $table, $identifier)
Definition: Clipboard.php:753
‪TYPO3\CMS\Backend\Clipboard\Clipboard\pasteUrl
‪string pasteUrl(string $table, $identifier, bool $setRedirect=true, array $update=null)
Definition: Clipboard.php:557
‪TYPO3\CMS\Backend\Clipboard\Clipboard\currentMode
‪string currentMode()
Definition: Clipboard.php:676
‪TYPO3\CMS\Backend\Clipboard\Clipboard\hasElements
‪bool hasElements()
Definition: Clipboard.php:384
‪TYPO3\CMS\Backend\Clipboard\Clipboard\setCurrentPad
‪setCurrentPad(string $padIdentifier)
Definition: Clipboard.php:191
‪TYPO3\CMS\Backend\Clipboard\Clipboard\initializeClipboard
‪initializeClipboard(?ServerRequestInterface $request=null)
Definition: Clipboard.php:102
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:40
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getModuleData
‪mixed getModuleData($module, $type='')
Definition: AbstractUserAuthentication.php:1054
‪TYPO3\CMS\Core\Resource\Folder
Definition: Folder.php:37
‪TYPO3\CMS\Core\Resource\ResourceFactory
Definition: ResourceFactory.php:41
‪TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException
Definition: ResourceDoesNotExistException.php:23
‪TYPO3\CMS\Core\Resource\File
Definition: File.php:24
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\pushModuleData
‪pushModuleData($module, $data, $noSave=0)
Definition: AbstractUserAuthentication.php:1034
‪TYPO3\CMS\Backend\Clipboard\Clipboard\$iconFactory
‪IconFactory $iconFactory
Definition: Clipboard.php:81
‪TYPO3\CMS\Backend\Clipboard\Clipboard\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: Clipboard.php:804
‪TYPO3\CMS\Backend\Clipboard\Clipboard\getClipboardData
‪getClipboardData(string $table='')
Definition: Clipboard.php:249
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Backend\Clipboard\Clipboard\$request
‪ServerRequestInterface $request
Definition: Clipboard.php:85
‪TYPO3\CMS\Backend\Clipboard\Clipboard\removeElement
‪removeElement(string $elementKey)
Definition: Clipboard.php:656
‪TYPO3\CMS\Backend\Clipboard\Clipboard\$current
‪string $current
Definition: Clipboard.php:75
‪TYPO3\CMS\Backend\Clipboard\Clipboard\cleanUpCBC
‪array cleanUpCBC(array $CBarr, string $table, bool $removeDeselected=false)
Definition: Clipboard.php:226
‪TYPO3\CMS\Backend\Clipboard\Clipboard\$clipData
‪array $clipData
Definition: Clipboard.php:71
‪TYPO3\CMS\Backend\Clipboard\Clipboard\__construct
‪__construct(IconFactory $iconFactory, UriBuilder $uriBuilder, ResourceFactory $resourceFactory)
Definition: Clipboard.php:87
‪TYPO3\CMS\Backend\Clipboard\Clipboard\endClipboard
‪endClipboard()
Definition: Clipboard.php:210
‪TYPO3\CMS\Core\Resource\ProcessedFile
Definition: ProcessedFile.php:45
‪TYPO3\CMS\Backend\Clipboard\Clipboard\saveClipboard
‪saveClipboard()
Definition: Clipboard.php:666
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:38
‪TYPO3\CMS\Backend\Clipboard\Clipboard\clipboardLabel
‪string clipboardLabel(string $key)
Definition: Clipboard.php:641
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction
Definition: DeletedRestriction.php:28
‪TYPO3\CMS\Backend\Clipboard\Clipboard\cleanCurrent
‪cleanCurrent()
Definition: Clipboard.php:685
‪TYPO3\CMS\Backend\Clipboard\Clipboard\getLanguageService
‪LanguageService getLanguageService()
Definition: Clipboard.php:794
‪TYPO3\CMS\Backend\Clipboard\Clipboard\selUrlFile
‪string selUrlFile(string $path, bool $copy=false, bool $deselect=false)
Definition: Clipboard.php:535
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:22
‪TYPO3\CMS\Core\Resource\Folder\getCombinedIdentifier
‪string getCombinedIdentifier()
Definition: Folder.php:181
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Backend\Clipboard\Clipboard\buildUrl
‪string buildUrl(array $parameters=[])
Definition: Clipboard.php:816
‪TYPO3\CMS\Backend\Clipboard
Definition: Clipboard.php:18
‪TYPO3\CMS\Backend\Clipboard\Clipboard\getLocalizations
‪array getLocalizations(string $table, array $parentRecord, bool $isRequestedTable)
Definition: Clipboard.php:402
‪TYPO3\CMS\Backend\Clipboard\Clipboard\getTabInfo
‪string getTabInfo(string $padIdentifier, string $table='')
Definition: Clipboard.php:469
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Backend\Clipboard\Clipboard\confirmMsgText
‪string confirmMsgText(string $table, $reference, string $type, array $selectedElements, string $columnLabel='')
Definition: Clipboard.php:584
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded
‪static bool isLoaded($key)
Definition: ExtensionManagementUtility.php:114
‪TYPO3\CMS\Core\Type\Bitmask\JsConfirmation
Definition: JsConfirmation.php:25
‪TYPO3\CMS\Backend\Clipboard\Clipboard\setCmd
‪setCmd(array $cmd)
Definition: Clipboard.php:150
‪TYPO3\CMS\Backend\Clipboard\Clipboard\printClipboard
‪printClipboard(string $table='')
Definition: Clipboard.php:240
‪TYPO3\CMS\Backend\Clipboard\Clipboard\elFromTable
‪array elFromTable(string $matchTable='', string $padIdentifier='')
Definition: Clipboard.php:719
‪TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction
Definition: WorkspaceRestriction.php:40