‪TYPO3CMS  10.4
FileDragProvider.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 
22 
28 {
32  protected ‪$itemsConfiguration = [
33  'copyInto' => [
34  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.copyFolder_into',
35  'iconIdentifier' => 'apps-pagetree-drag-move-into',
36  'callbackAction' => 'dropCopyInto'
37  ],
38  'moveInto' => [
39  'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.moveFolder_into',
40  'iconIdentifier' => 'apps-pagetree-drag-move-into',
41  'callbackAction' => 'dropMoveInto'
42  ]
43  ];
44 
48  public function ‪canHandle(): bool
49  {
50  return $this->table === 'folders-drag';
51  }
52 
57  protected function ‪getAdditionalAttributes(string $itemName): array
58  {
59  $attributes = [
60  'data-callback-module' => 'TYPO3/CMS/Filelist/ContextMenuActions',
61  'data-drop-target' => htmlspecialchars(GeneralUtility::_GP('dstId'))
62  ];
63 
64  return $attributes;
65  }
66 }
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileDragProvider\getAdditionalAttributes
‪array getAdditionalAttributes(string $itemName)
Definition: FileDragProvider.php:56
‪TYPO3\CMS\Backend\ContextMenu\ItemProviders\AbstractProvider
Definition: AbstractProvider.php:31
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders
Definition: FileDragProvider.php:18
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileDragProvider\$itemsConfiguration
‪array $itemsConfiguration
Definition: FileDragProvider.php:31
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileDragProvider\canHandle
‪bool canHandle()
Definition: FileDragProvider.php:47
‪TYPO3\CMS\Filelist\ContextMenu\ItemProviders\FileDragProvider
Definition: FileDragProvider.php:28
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46