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