‪TYPO3CMS  10.4
CheckFlexFormValue.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 
25 {
33  public function ‪checkFlexFormValue_beforeMerge(‪DataHandler $dataHandler, array &$currentValue, array &$newValue)
34  {
35  $currentValue = $this->‪removeSwitchableControllerActionsRecursive($currentValue);
36  }
37 
44  protected function ‪removeSwitchableControllerActionsRecursive(array $a)
45  {
46  $r = [];
47 
48  foreach ($a as $k => $v) {
49  if ($k === 'switchableControllerActions') {
50  continue;
51  }
52 
53  $r[$k] = is_array($v) ? $this->‪removeSwitchableControllerActionsRecursive($v) : $v;
54  }
55 
56  return $r;
57  }
58 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:84
‪TYPO3\CMS\Extbase\Hook\DataHandler\CheckFlexFormValue\removeSwitchableControllerActionsRecursive
‪array removeSwitchableControllerActionsRecursive(array $a)
Definition: CheckFlexFormValue.php:44
‪TYPO3\CMS\Extbase\Hook\DataHandler\CheckFlexFormValue\checkFlexFormValue_beforeMerge
‪checkFlexFormValue_beforeMerge(DataHandler $dataHandler, array &$currentValue, array &$newValue)
Definition: CheckFlexFormValue.php:33
‪TYPO3\CMS\Extbase\Hook\DataHandler
Definition: CheckFlexFormValue.php:16
‪TYPO3\CMS\Extbase\Hook\DataHandler\CheckFlexFormValue
Definition: CheckFlexFormValue.php:25