‪TYPO3CMS  10.4
FileListEditIconsHook.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 
18 namespace ‪TYPO3\CMS\Form\Hooks;
19 
24 
29 {
30 
37  public function ‪manipulateEditIcons(&$cells, &$parentObject)
38  {
39  $fileOrFolderObject = $cells['__fileOrFolderObject'];
40  $fullIdentifier = $fileOrFolderObject->getCombinedIdentifier();
42 
43  if (!$isFormDefinition) {
44  return;
45  }
46 
47  $disableIconNames = ['edit', 'view', 'replace', 'rename'];
48  foreach ($disableIconNames as $disableIconName) {
49  if (!empty($cells[$disableIconName])) {
50  $cells[$disableIconName] = $parentObject->spaceIcon;
51  }
52  }
53  }
54 }
‪TYPO3\CMS\Core\Utility\StringUtility\endsWith
‪static bool endsWith($haystack, $needle)
Definition: StringUtility.php:61
‪TYPO3\CMS\Form\Hooks
Definition: DataStructureIdentifierHook.php:18
‪TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManager
Definition: FormPersistenceManager.php:54
‪TYPO3\CMS\Filelist\FileList
Definition: FileList.php:47
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Form\Hooks\FileListEditIconsHook
Definition: FileListEditIconsHook.php:29
‪TYPO3\CMS\Form\Mvc\Persistence\FormPersistenceManager\FORM_DEFINITION_FILE_EXTENSION
‪const FORM_DEFINITION_FILE_EXTENSION
Definition: FormPersistenceManager.php:55
‪TYPO3\CMS\Filelist\FileListEditIconHookInterface
Definition: FileListEditIconHookInterface.php:22
‪TYPO3\CMS\Form\Hooks\FileListEditIconsHook\manipulateEditIcons
‪manipulateEditIcons(&$cells, &$parentObject)
Definition: FileListEditIconsHook.php:37