‪TYPO3CMS  9.5
FileStorageProvider.php
Go to the documentation of this file.
1 <?php
2 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 
23 {
27  protected ‪$itemsConfiguration = [
28  'edit' => [
29  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.edit',
30  'iconIdentifier' => 'actions-open',
31  'callbackAction' => 'editFileStorage'
32  ],
33  'upload' => [
34  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.upload',
35  'iconIdentifier' => 'actions-edit-upload',
36  'callbackAction' => 'uploadFile'
37  ],
38  'new' => [
39  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.new',
40  'iconIdentifier' => 'actions-document-new',
41  'callbackAction' => 'createFile'
42  ],
43  'info' => [
44  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.info',
45  'iconIdentifier' => 'actions-document-info',
46  'callbackAction' => 'openInfoPopUp'
47  ],
48  'divider' => [
49  'type' => 'divider'
50  ],
51  'pasteInto' => [
52  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.pasteinto',
53  'iconIdentifier' => 'actions-document-paste-into',
54  'callbackAction' => 'pasteFileInto'
55  ],
56  ];
57 
61  public function ‪canHandle(): bool
62  {
63  return $this->table === 'sys_file_storage';
64  }
65 
69  protected function ‪canShowInfo(): bool
70  {
71  return $this->backendUser->check('tables_select', 'sys_file_storage');
72  }
73 
77  protected function ‪canBeEdited(): bool
78  {
79  return $this->backendUser->check('tables_modify', 'sys_file_storage');
80  }
81 }
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileStorageProvider\canShowInfo
‪bool canShowInfo()
Definition: FileStorageProvider.php:68
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders
Definition: FileDragProvider.php:3
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileProvider
Definition: FileProvider.php:29
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileStorageProvider\canHandle
‪bool canHandle()
Definition: FileStorageProvider.php:60
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileStorageProvider
Definition: FileStorageProvider.php:23
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileStorageProvider\$itemsConfiguration
‪array $itemsConfiguration
Definition: FileStorageProvider.php:26
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileStorageProvider\canBeEdited
‪bool canBeEdited()
Definition: FileStorageProvider.php:76