‪TYPO3CMS  11.5
ShortcutRepository.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 Symfony\Component\Routing\Route;
24 use TYPO3\CMS\Backend\Utility\BackendUtility;
38 
45 {
49  protected const ‪SUPERGLOBAL_GROUP = -100;
50 
51  protected const ‪TABLE_NAME = 'sys_be_shortcuts';
52 
53  protected array ‪$shortcuts;
54 
55  protected array ‪$shortcutGroups;
56 
58 
60 
62 
64  {
65  $this->connectionPool = ‪$connectionPool;
66  $this->iconFactory = ‪$iconFactory;
67  $this->moduleLoader = ‪$moduleLoader;
68  $this->moduleLoader->load(‪$GLOBALS['TBE_MODULES']);
69 
70  $this->shortcutGroups = $this->‪initShortcutGroups();
71  $this->shortcuts = $this->‪initShortcuts();
72  }
73 
80  public function ‪getShortcutById(int $shortcutId)
81  {
82  foreach ($this->shortcuts as $shortcut) {
83  if ($shortcut['raw']['uid'] === $shortcutId) {
84  return $shortcut;
85  }
86  }
87 
88  return false;
89  }
90 
97  public function ‪getShortcutsByGroup(int $groupId): array
98  {
99  ‪$shortcuts = [];
100 
101  foreach ($this->shortcuts as $shortcut) {
102  if ($shortcut['group'] === $groupId) {
103  ‪$shortcuts[] = $shortcut;
104  }
105  }
106 
107  return ‪$shortcuts;
108  }
109 
115  public function ‪getShortcutGroups(): array
116  {
118 
119  if (!$this->‪getBackendUser()->isAdmin()) {
120  foreach (‪$shortcutGroups as $groupId => $groupName) {
121  if ((int)$groupId < 0) {
122  unset(‪$shortcutGroups[$groupId]);
123  }
124  }
125  }
126 
127  return ‪$shortcutGroups;
128  }
129 
135  public function ‪getGroupsFromShortcuts(): array
136  {
137  $groups = [];
138 
139  foreach ($this->shortcuts as $shortcut) {
140  $groups[$shortcut['group']] = $this->shortcutGroups[$shortcut['group']] ?? '';
141  }
142 
143  return array_unique($groups);
144  }
145 
153  public function ‪shortcutExists(string $routeIdentifier, string $arguments): bool
154  {
155  $queryBuilder = $this->connectionPool->getQueryBuilderForTable(self::TABLE_NAME);
156  $queryBuilder->getRestrictions()->removeAll();
157 
158  $uid = $queryBuilder->select('uid')
159  ->from(self::TABLE_NAME)
160  ->where(
161  $queryBuilder->expr()->eq(
162  'userid',
163  $queryBuilder->createNamedParameter($this->getBackendUser()->user['uid'], ‪Connection::PARAM_INT)
164  ),
165  $queryBuilder->expr()->eq('route', $queryBuilder->createNamedParameter($routeIdentifier)),
166  $queryBuilder->expr()->eq('arguments', $queryBuilder->createNamedParameter($arguments))
167  )
168  ->executeQuery()
169  ->fetchOne();
170 
171  return (bool)$uid;
172  }
173 
183  public function ‪addShortcut(string $routeIdentifier, string $arguments = '', string $title = ''): bool
184  {
185  // Do not add shortcuts for routes which do not exist
186  if (!$this->‪routeExists($routeIdentifier)) {
187  return false;
188  }
189 
190  $languageService = $this->‪getLanguageService();
191 
192  // Only apply "magic" if title is not set
193  // @todo This is deprecated and can be removed in v12
194  if ($title === '') {
195  $queryParameters = json_decode($arguments, true);
196  $titlePrefix = '';
197  $type = 'other';
198  $table = '';
199  $recordId = 0;
200  $pageId = 0;
201 
202  if ($queryParameters && is_array($queryParameters['edit'] ?? null)) {
203  $table = (string)key($queryParameters['edit']);
204  $recordId = (int)key($queryParameters['edit'][$table]);
205  $pageId = (int)(BackendUtility::getRecord($table, $recordId)['pid'] ?? 0);
206  $languageFile = 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf';
207  $action = $queryParameters['edit'][$table][$recordId];
208 
209  switch ($action) {
210  case 'edit':
211  $type = 'edit';
212  $titlePrefix = $languageService->sL($languageFile . ':shortcut_edit');
213  break;
214  case 'new':
215  $type = 'new';
216  $titlePrefix = $languageService->sL($languageFile . ':shortcut_create');
217  break;
218  }
219  }
220 
221  $moduleName = $this->‪getModuleNameFromRouteIdentifier($routeIdentifier);
222  $id = (string)($queryParameters['id'] ?? '');
223  if ($moduleName === 'file_FilelistList' && $id !== '') {
224  try {
225  $resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);
226  $resource = $resourceFactory->getObjectFromCombinedIdentifier($queryParameters['id']);
227  $title = trim(sprintf(
228  '%s (%s)',
229  $titlePrefix,
230  $resource->getName()
231  ));
232  } catch (‪ResourceDoesNotExistException $e) {
233  }
234  } else {
235  // Lookup the title of this page and use it as default description
236  $pageId = $pageId ?: $recordId ?: (int)$id;
237  $page = $pageId ? BackendUtility::getRecord('pages', $pageId) : null;
238 
239  if (!empty($page)) {
240  // Set the name to the title of the page
241  if ($type === 'other') {
242  $title = sprintf(
243  '%s (%s)',
244  $title,
245  $page['title']
246  );
247  } else {
248  $title = sprintf(
249  '%s %s (%s)',
250  $titlePrefix,
251  $languageService->sL(‪$GLOBALS['TCA'][$table]['ctrl']['title']),
252  $page['title']
253  );
254  }
255  } elseif (!empty($table)) {
256  $title = trim(sprintf(
257  '%s %s',
258  $titlePrefix,
259  $languageService->sL(‪$GLOBALS['TCA'][$table]['ctrl']['title'])
260  ));
261  }
262  }
263  }
264 
265  // In case title is still empty try to set the modules short description label
266  // @todo This is deprecated and can be removed in v12
267  if ($title === '') {
268  $moduleLabels = $this->moduleLoader->getLabelsForModule($this->‪getModuleNameFromRouteIdentifier($routeIdentifier));
269  if (!empty($moduleLabels['shortdescription'])) {
270  $title = $this->‪getLanguageService()->‪sL($moduleLabels['shortdescription']);
271  }
272  }
273 
274  $queryBuilder = $this->connectionPool->getQueryBuilderForTable(self::TABLE_NAME);
275  $affectedRows = $queryBuilder
276  ->insert(self::TABLE_NAME)
277  ->values([
278  'userid' => $this->‪getBackendUser()->user['uid'],
279  'route' => $routeIdentifier,
280  'arguments' => $arguments,
281  'description' => $title ?: 'Shortcut',
282  'sorting' => ‪$GLOBALS['EXEC_TIME'],
283  ])
284  ->executeStatement();
285 
286  return $affectedRows === 1;
287  }
288 
297  public function ‪updateShortcut(int $id, string $title, int $groupId): bool
298  {
299  $backendUser = $this->‪getBackendUser();
300  $queryBuilder = $this->connectionPool->getQueryBuilderForTable(self::TABLE_NAME);
301  $queryBuilder->update(self::TABLE_NAME)
302  ->where(
303  $queryBuilder->expr()->eq(
304  'uid',
305  $queryBuilder->createNamedParameter($id, ‪Connection::PARAM_INT)
306  )
307  )
308  ->set('description', $title)
309  ->set('sc_group', $groupId);
310 
311  if (!$backendUser->isAdmin()) {
312  // Users can only modify their own shortcuts
313  $queryBuilder->andWhere(
314  $queryBuilder->expr()->eq(
315  'userid',
316  $queryBuilder->createNamedParameter($backendUser->user['uid'], ‪Connection::PARAM_INT)
317  )
318  );
319 
320  if ($groupId < 0) {
321  $queryBuilder->set('sc_group', 0);
322  }
323  }
324 
325  $affectedRows = $queryBuilder->executeStatement();
326 
327  return $affectedRows === 1;
328  }
329 
336  public function ‪removeShortcut(int $id): bool
337  {
338  $shortcut = $this->‪getShortcutById($id);
339  $success = false;
340 
341  if ((int)$shortcut['raw']['userid'] === (int)$this->‪getBackendUser()->user['uid']) {
342  $queryBuilder = $this->connectionPool->getQueryBuilderForTable(self::TABLE_NAME);
343  $affectedRows = $queryBuilder->delete(self::TABLE_NAME)
344  ->where(
345  $queryBuilder->expr()->eq(
346  'uid',
347  $queryBuilder->createNamedParameter($id, ‪Connection::PARAM_INT)
348  )
349  )
350  ->executeStatement();
351 
352  if ($affectedRows === 1) {
353  $success = true;
354  }
355  }
356 
357  return $success;
358  }
359 
365  protected function ‪initShortcutGroups(): array
366  {
367  $languageService = $this->‪getLanguageService();
368  $backendUser = $this->‪getBackendUser();
369  // By default, 5 groups are set
370  $shortcutGroups = [
371  1 => '1',
372  2 => '1',
373  3 => '1',
374  4 => '1',
375  5 => '1',
376  ];
377 
378  // Groups from TSConfig
379  $bookmarkGroups = $backendUser->getTSConfig()['options.']['bookmarkGroups.'] ?? [];
380 
381  if (is_array($bookmarkGroups)) {
382  foreach ($bookmarkGroups as $groupId => $label) {
383  if (!empty($label)) {
384  $label = (string)$label;
385  ‪$shortcutGroups[$groupId] = strpos($label, 'LLL:') === 0 ? $languageService->sL($label) : $label;
386  } elseif ($backendUser->isAdmin()) {
387  unset(‪$shortcutGroups[$groupId]);
388  }
389  }
390  }
391 
392  // Generate global groups, all global groups have negative IDs.
393  if (!empty(‪$shortcutGroups)) {
394  foreach (‪$shortcutGroups as $groupId => $groupLabel) {
395  ‪$shortcutGroups[$groupId * -1] = $groupLabel;
396  }
397  }
398 
399  // Group -100 is kind of superglobal and can't be changed.
401 
402  // Add labels
403  $languageFile = 'LLL:EXT:core/Resources/Private/Language/locallang_misc.xlf';
404 
405  foreach (‪$shortcutGroups as $groupId => $groupLabel) {
406  $groupId = (int)$groupId;
407  $label = $groupLabel;
408 
409  if ($groupLabel === '1') {
410  $label = $languageService->sL($languageFile . ':bookmark_group_' . abs($groupId));
411 
412  if (empty($label)) {
413  // Fallback label
414  $label = $languageService->sL($languageFile . ':bookmark_group') . ' ' . abs($groupId);
415  }
416  }
417 
418  if ($groupId < 0) {
419  // Global group
420  $label = $languageService->sL($languageFile . ':bookmark_global') . ': ' . (!empty($label) ? $label : abs($groupId));
421 
422  if ($groupId === self::SUPERGLOBAL_GROUP) {
423  $label = $languageService->sL($languageFile . ':bookmark_global') . ': ' . $languageService->sL($languageFile . ':bookmark_all');
424  }
425  }
426 
427  ‪$shortcutGroups[$groupId] = htmlspecialchars($label);
428  }
429 
430  return ‪$shortcutGroups;
431  }
432 
438  protected function ‪initShortcuts(): array
439  {
440  $backendUser = $this->‪getBackendUser();
441  $lastGroup = 0;
442  ‪$shortcuts = [];
443 
444  $queryBuilder = $this->connectionPool->getQueryBuilderForTable(self::TABLE_NAME);
445  $result = $queryBuilder->select('*')
446  ->from(self::TABLE_NAME)
447  ->where(
448  $queryBuilder->expr()->andX(
449  $queryBuilder->expr()->eq(
450  'userid',
451  $queryBuilder->createNamedParameter($backendUser->user['uid'], ‪Connection::PARAM_INT)
452  ),
453  $queryBuilder->expr()->gte(
454  'sc_group',
455  $queryBuilder->createNamedParameter(0, ‪Connection::PARAM_INT)
456  )
457  )
458  )
459  ->orWhere(
460  $queryBuilder->expr()->in(
461  'sc_group',
462  $queryBuilder->createNamedParameter(
463  array_keys($this->‪getGlobalShortcutGroups()),
464  Connection::PARAM_INT_ARRAY
465  )
466  )
467  )
468  ->orderBy('sc_group')
469  ->addOrderBy('sorting')
470  ->executeQuery();
471 
472  while ($row = $result->fetchAssociative()) {
473  $pageId = 0;
474  $shortcut = ['raw' => $row];
475  $routeIdentifier = $row['route'] ?? '';
476  $arguments = json_decode($row['arguments'] ?? '', true) ?? [];
477 
478  if ($routeIdentifier === 'record_edit' && is_array($arguments['edit'])) {
479  $shortcut['table'] = (string)(key($arguments['edit']) ?? '');
480  $shortcut['recordid'] = key($arguments['edit'][$shortcut['table']]);
481 
482  if ($arguments['edit'][$shortcut['table']][$shortcut['recordid']] === 'edit') {
483  $shortcut['type'] = 'edit';
484  } elseif ($arguments['edit'][$shortcut['table']][$shortcut['recordid']] === 'new') {
485  $shortcut['type'] = 'new';
486  }
487 
488  if (str_ends_with((string)$shortcut['recordid'], ',')) {
489  $shortcut['recordid'] = substr((string)$shortcut['recordid'], 0, -1);
490  }
491  } else {
492  $shortcut['type'] = 'other';
493  }
494 
495  $moduleName = $this->‪getModuleNameFromRouteIdentifier($routeIdentifier);
496 
497  // Skip shortcut if module name can not be resolved
498  if ($moduleName === '') {
499  continue;
500  }
501 
502  // Check if the user has access to this module
503  // @todo Hack for EditDocumentController / FormEngine, see issues #91368 and #91210
504  if ($routeIdentifier !== 'record_edit' && !is_array($this->moduleLoader->checkMod($moduleName))) {
505  continue;
506  }
507 
508  if ($moduleName === 'file_FilelistList') {
509  $combinedIdentifier = (string)($arguments['id'] ?? '');
510  if ($combinedIdentifier !== '') {
511  $storage = GeneralUtility::makeInstance(StorageRepository::class)->findByCombinedIdentifier($combinedIdentifier);
512  if ($storage === null || $storage->isFallbackStorage()) {
513  // Continue, if invalid storage or disallowed fallback storage
514  continue;
515  }
516  $folderIdentifier = substr($combinedIdentifier, strpos($combinedIdentifier, ':') + 1);
517  try {
518  // By using $storage->getFolder() we implicitly check whether the folder
519  // still exists and the user has necessary permissions to access it.
520  $storage->getFolder($folderIdentifier);
522  // Continue, since current user does not have access to the folder
523  continue;
524  } catch (‪FolderDoesNotExistException $e) {
525  // Folder does not longer exists. However, the shortcut
526  // is still displayed, allowing the user to remove it.
527  }
528  }
529  } else {
530  if ($moduleName === 'record_edit' && isset($shortcut['table'], $shortcut['recordid'])) {
531  // Check if user is allowed to modify the requested record
532  if (!$backendUser->check('tables_modify', $shortcut['table'])) {
533  continue;
534  }
535  if ($shortcut['type'] === 'edit'
536  || ($shortcut['type'] === 'new' && (int)$shortcut['recordid'] < 0)
537  ) {
538  $record = BackendUtility::getRecord($shortcut['table'], abs((int)$shortcut['recordid']));
539  // Check if requested record exists
540  if ($record === null || $record === []) {
541  continue;
542  }
543  // Store the page id of the record in question
544  $pageId = ($shortcut['table'] === 'pages' ? (int)($record['uid'] ?? 0) : (int)($record['pid'] ?? 0));
545  } elseif ($shortcut['type'] === 'new' && (int)$shortcut['recordid'] > 0) {
546  // If type is new and "recordid" is positive, it references the current page
547  $pageId = (int)$shortcut['recordid'];
548  }
549  } else {
550  // In case this is no record edit shortcut, treat a possible "id" as page id
551  $pageId = (int)($arguments['id'] ?? 0);
552  }
553  if ($pageId > 0 && !$backendUser->isAdmin()) {
554  // Check for webmount access
555  if ($backendUser->isInWebMount($pageId) === null) {
556  continue;
557  }
558  // Check for record access
559  $pageRow = BackendUtility::getRecord('pages', $pageId);
560  if ($pageRow === null || !$backendUser->doesUserHaveAccess($pageRow, ‪Permission::PAGE_SHOW)) {
561  continue;
562  }
563  }
564  }
565 
566  $shortcutGroup = (int)$row['sc_group'];
567  if ($shortcutGroup && $lastGroup !== $shortcutGroup && $shortcutGroup !== self::SUPERGLOBAL_GROUP) {
568  $shortcut['groupLabel'] = $this->‪getShortcutGroupLabel($shortcutGroup);
569  }
570  $lastGroup = $shortcutGroup;
571 
572  $description = $row['description'] ?? '';
573  // Empty description should usually never happen since not defining such, is deprecated and a
574  // fallback is in place, at least for v11. Only manual inserts could lead to an empty description.
575  // @todo Can be removed in v12 since setting a display name is mandatory then
576  if ($description === '') {
577  $moduleLabel = (string)($this->moduleLoader->getLabelsForModule($moduleName)['shortdescription'] ?? '');
578  if ($moduleLabel !== '') {
579  $description = $this->‪getLanguageService()->‪sL($moduleLabel);
580  }
581  }
582 
583  $shortcutUrl = (string)GeneralUtility::makeInstance(UriBuilder::class)->buildUriFromRoute($routeIdentifier, $arguments);
584 
585  $shortcut['group'] = $shortcutGroup;
586  $shortcut['icon'] = $this->‪getShortcutIcon($routeIdentifier, $moduleName, $shortcut);
587  $shortcut['label'] = $description;
588  $shortcut['href'] = $shortcutUrl;
589  $shortcut['route'] = $routeIdentifier;
590  $shortcut['module'] = $moduleName;
591  $shortcut['pageId'] = $pageId;
592  ‪$shortcuts[] = $shortcut;
593  }
594 
595  return ‪$shortcuts;
596  }
597 
603  protected function ‪getGlobalShortcutGroups(): array
604  {
605  $globalGroups = [];
606 
607  foreach ($this->shortcutGroups as $groupId => $groupLabel) {
608  if ($groupId < 0) {
609  $globalGroups[$groupId] = $groupLabel;
610  }
611  }
612 
613  return $globalGroups;
614  }
615 
622  protected function ‪getShortcutGroupLabel(int $groupId): string
623  {
624  return $this->shortcutGroups[$groupId] ?? '';
625  }
626 
635  protected function ‪getShortcutIcon(string $routeIdentifier, string $moduleName, array $shortcut): string
636  {
637  switch ($routeIdentifier) {
638  case 'record_edit':
639  $table = $shortcut['table'];
640  $recordid = $shortcut['recordid'];
641  $icon = '';
642 
643  if ($shortcut['type'] === 'edit') {
644  $row = BackendUtility::getRecordWSOL($table, $recordid) ?? [];
645  $icon = $this->iconFactory->getIconForRecord($table, $row, ‪Icon::SIZE_SMALL)->render();
646  } elseif ($shortcut['type'] === 'new') {
647  $icon = $this->iconFactory->getIconForRecord($table, [], ‪Icon::SIZE_SMALL)->render();
648  }
649  break;
650  case 'file_edit':
651  $icon = $this->iconFactory->getIcon('mimetypes-text-html', ‪Icon::SIZE_SMALL)->render();
652  break;
653  case 'wizard_rte':
654  $icon = $this->iconFactory->getIcon('mimetypes-word', ‪Icon::SIZE_SMALL)->render();
655  break;
656  default:
657  $iconIdentifier = '';
658 
659  if (str_contains($moduleName, '_')) {
660  [$mainModule, $subModule] = explode('_', $moduleName, 2);
661  $iconIdentifier = $this->moduleLoader->getModules()[$mainModule]['sub'][$subModule]['iconIdentifier'] ?? '';
662  } elseif ($moduleName !== '') {
663  $iconIdentifier = $this->moduleLoader->getModules()[$moduleName]['iconIdentifier'] ?? '';
664  }
665 
666  if (!$iconIdentifier) {
667  $iconIdentifier = 'empty-empty';
668  }
669 
670  $icon = $this->iconFactory->getIcon($iconIdentifier, ‪Icon::SIZE_SMALL)->render();
671  }
672 
673  return $icon;
674  }
675 
682  protected function ‪getModuleNameFromRouteIdentifier(string $routeIdentifier): string
683  {
684  if ($this->‪isSpecialRoute($routeIdentifier)) {
685  return $routeIdentifier;
686  }
687 
688  $route = $this->‪getRoute($routeIdentifier);
689  return $route !== null ? (string)($route->getOption('moduleName') ?? '') : '';
690  }
691 
698  protected function ‪getRoute(string $routeIdentifier): ?Route
699  {
700  return GeneralUtility::makeInstance(Router::class)->getRoutes()[$routeIdentifier] ?? null;
701  }
702 
709  protected function ‪routeExists(string $routeIdentifier): bool
710  {
711  return $this->‪getRoute($routeIdentifier) !== null;
712  }
713 
720  protected function ‪isSpecialRoute(string $routeIdentifier): bool
721  {
722  return in_array($routeIdentifier, ['record_edit', 'file_edit', 'wizard_rte'], true);
723  }
724 
731  {
732  return ‪$GLOBALS['BE_USER'];
733  }
734 
739  {
740  return ‪$GLOBALS['LANG'];
741  }
742 }
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:30
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository
Definition: ShortcutRepository.php:45
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getShortcutIcon
‪string getShortcutIcon(string $routeIdentifier, string $moduleName, array $shortcut)
Definition: ShortcutRepository.php:635
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\$iconFactory
‪IconFactory $iconFactory
Definition: ShortcutRepository.php:59
‪TYPO3\CMS\Core\Database\Connection\PARAM_INT
‪const PARAM_INT
Definition: Connection.php:49
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\initShortcutGroups
‪array initShortcutGroups()
Definition: ShortcutRepository.php:365
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\updateShortcut
‪bool updateShortcut(int $id, string $title, int $groupId)
Definition: ShortcutRepository.php:297
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\initShortcuts
‪array initShortcuts()
Definition: ShortcutRepository.php:438
‪TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException
Definition: InsufficientFolderAccessPermissionsException.php:23
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\routeExists
‪bool routeExists(string $routeIdentifier)
Definition: ShortcutRepository.php:709
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\$shortcuts
‪array $shortcuts
Definition: ShortcutRepository.php:53
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\isSpecialRoute
‪bool isSpecialRoute(string $routeIdentifier)
Definition: ShortcutRepository.php:720
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getLanguageService
‪LanguageService getLanguageService()
Definition: ShortcutRepository.php:738
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:34
‪TYPO3\CMS\Backend\Backend\Shortcut
Definition: ShortcutRepository.php:18
‪TYPO3\CMS\Core\Localization\LanguageService\sL
‪string sL($input)
Definition: LanguageService.php:161
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getGlobalShortcutGroups
‪array getGlobalShortcutGroups()
Definition: ShortcutRepository.php:603
‪TYPO3\CMS\Core\Type\Bitmask\Permission
Definition: Permission.php:26
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getShortcutsByGroup
‪array getShortcutsByGroup(int $groupId)
Definition: ShortcutRepository.php:97
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\shortcutExists
‪bool shortcutExists(string $routeIdentifier, string $arguments)
Definition: ShortcutRepository.php:153
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\addShortcut
‪bool addShortcut(string $routeIdentifier, string $arguments='', string $title='')
Definition: ShortcutRepository.php:183
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:40
‪TYPO3\CMS\Core\Resource\ResourceFactory
Definition: ResourceFactory.php:41
‪TYPO3\CMS\Core\Resource\Exception\FolderDoesNotExistException
Definition: FolderDoesNotExistException.php:21
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getShortcutById
‪mixed getShortcutById(int $shortcutId)
Definition: ShortcutRepository.php:80
‪TYPO3\CMS\Backend\Module\ModuleLoader
Definition: ModuleLoader.php:34
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getGroupsFromShortcuts
‪array getGroupsFromShortcuts()
Definition: ShortcutRepository.php:135
‪TYPO3\CMS\Core\Resource\StorageRepository
Definition: StorageRepository.php:38
‪TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException
Definition: ResourceDoesNotExistException.php:23
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getBackendUser
‪BackendUserAuthentication getBackendUser()
Definition: ShortcutRepository.php:730
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW
‪const PAGE_SHOW
Definition: Permission.php:35
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\removeShortcut
‪bool removeShortcut(int $id)
Definition: ShortcutRepository.php:336
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:38
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getShortcutGroups
‪array getShortcutGroups()
Definition: ShortcutRepository.php:115
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\SUPERGLOBAL_GROUP
‪const SUPERGLOBAL_GROUP
Definition: ShortcutRepository.php:49
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getShortcutGroupLabel
‪string getShortcutGroupLabel(int $groupId)
Definition: ShortcutRepository.php:622
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\$connectionPool
‪ConnectionPool $connectionPool
Definition: ShortcutRepository.php:57
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\$moduleLoader
‪ModuleLoader $moduleLoader
Definition: ShortcutRepository.php:61
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getRoute
‪Route null getRoute(string $routeIdentifier)
Definition: ShortcutRepository.php:698
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\__construct
‪__construct(ConnectionPool $connectionPool, IconFactory $iconFactory, ModuleLoader $moduleLoader)
Definition: ShortcutRepository.php:63
‪TYPO3\CMS\Backend\Routing\Router
Definition: Router.php:39
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\$shortcutGroups
‪array $shortcutGroups
Definition: ShortcutRepository.php:55
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\TABLE_NAME
‪const TABLE_NAME
Definition: ShortcutRepository.php:51
‪TYPO3\CMS\Backend\Backend\Shortcut\ShortcutRepository\getModuleNameFromRouteIdentifier
‪string getModuleNameFromRouteIdentifier(string $routeIdentifier)
Definition: ShortcutRepository.php:682