‪TYPO3CMS  9.5
HookFixture.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 
20 
25 {
29  protected ‪$invocations = [];
30 
34  public function ‪purge()
35  {
36  $this->invocations = [];
37  }
38 
43  public function ‪findInvocationsByMethodName(string $methodName)
44  {
45  return $this->invocations[$methodName] ?? null;
46  }
47 
51  public function ‪processDatamap_beforeStart(‪DataHandler $dataHandler)
52  {
53  $this->invocations[__FUNCTION__][] = true;
54  }
55 
62  public function ‪processDatamap_preProcessFieldArray(array $fieldArray, string $table, $id, ‪DataHandler $dataHandler)
63  {
64  $this->invocations[__FUNCTION__][] = [
65  'fieldArray' => $fieldArray,
66  'table' => $table,
67  'id' => $id,
68  ];
69  }
70 
78  public function ‪processDatamap_postProcessFieldArray(string $status, string $table, $id, array $fieldArray, ‪DataHandler $dataHandler)
79  {
80  $this->invocations[__FUNCTION__][] = [
81  'status' => $status,
82  'table' => $table,
83  'id' => $id,
84  'fieldArray' => $fieldArray,
85  ];
86  }
87 
95  public function ‪processDatamap_afterDatabaseOperations(string $status, string $table, $id, array $fieldArray, ‪DataHandler $dataHandler)
96  {
97  $this->invocations[__FUNCTION__][] = [
98  'status' => $status,
99  'table' => $table,
100  'id' => $id,
101  'fieldArray' => $fieldArray,
102  ];
103  }
104 
108  public function ‪processDatamap_afterAllOperations(‪DataHandler $dataHandler)
109  {
110  $this->invocations[__FUNCTION__][] = true;
111  }
112 
116  public function ‪processCmdmap_beforeStart(‪DataHandler $dataHandler)
117  {
118  $this->invocations[__FUNCTION__][] = true;
119  }
120 
129  public function ‪processCmdmap_preProcess(string $command, string $table, $id, $value, ‪DataHandler $dataHandler, $pasteUpdate)
130  {
131  $this->invocations[__FUNCTION__][] = [
132  'command' => $command,
133  'table' => $table,
134  'id' => $id,
135  'value' => $value,
136  'pasteUpdate' => $pasteUpdate,
137  ];
138  }
139 
149  public function ‪processCmdmap(string $command, string $table, $id, $value, bool $commandIsProcessed, ‪DataHandler $dataHandler, $pasteUpdate)
150  {
151  $this->invocations[__FUNCTION__][] = [
152  'command' => $command,
153  'table' => $table,
154  'id' => $id,
155  'value' => $value,
156  'commandIsProcessed' => $commandIsProcessed,
157  'pasteUpdate' => $pasteUpdate,
158  ];
159  }
160 
170  public function ‪processCmdmap_postProcess(string $command, string $table, $id, $value, ‪DataHandler $dataHandler, $pasteUpdate, $pasteDatamap)
171  {
172  $this->invocations[__FUNCTION__][] = [
173  'command' => $command,
174  'table' => $table,
175  'id' => $id,
176  'value' => $value,
177  'pasteUpdate' => $pasteUpdate,
178  'pasteDatamap' => $pasteDatamap,
179  ];
180  }
181 
185  public function ‪processCmdmap_afterFinish(‪DataHandler $dataHandler)
186  {
187  $this->invocations[__FUNCTION__][] = true;
188  }
189 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:81
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processDatamap_afterDatabaseOperations
‪processDatamap_afterDatabaseOperations(string $status, string $table, $id, array $fieldArray, DataHandler $dataHandler)
Definition: HookFixture.php:94
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\purge
‪purge()
Definition: HookFixture.php:33
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processDatamap_preProcessFieldArray
‪processDatamap_preProcessFieldArray(array $fieldArray, string $table, $id, DataHandler $dataHandler)
Definition: HookFixture.php:61
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures
Definition: HookFixture.php:3
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture
Definition: HookFixture.php:25
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processCmdmap_postProcess
‪processCmdmap_postProcess(string $command, string $table, $id, $value, DataHandler $dataHandler, $pasteUpdate, $pasteDatamap)
Definition: HookFixture.php:169
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processCmdmap_afterFinish
‪processCmdmap_afterFinish(DataHandler $dataHandler)
Definition: HookFixture.php:184
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processDatamap_postProcessFieldArray
‪processDatamap_postProcessFieldArray(string $status, string $table, $id, array $fieldArray, DataHandler $dataHandler)
Definition: HookFixture.php:77
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:22
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\findInvocationsByMethodName
‪array null findInvocationsByMethodName(string $methodName)
Definition: HookFixture.php:42
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\$invocations
‪array[] $invocations
Definition: HookFixture.php:28
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processDatamap_beforeStart
‪processDatamap_beforeStart(DataHandler $dataHandler)
Definition: HookFixture.php:50
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processCmdmap_preProcess
‪processCmdmap_preProcess(string $command, string $table, $id, $value, DataHandler $dataHandler, $pasteUpdate)
Definition: HookFixture.php:128
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processCmdmap_beforeStart
‪processCmdmap_beforeStart(DataHandler $dataHandler)
Definition: HookFixture.php:115
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processCmdmap
‪processCmdmap(string $command, string $table, $id, $value, bool $commandIsProcessed, DataHandler $dataHandler, $pasteUpdate)
Definition: HookFixture.php:148
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processDatamap_afterAllOperations
‪processDatamap_afterAllOperations(DataHandler $dataHandler)
Definition: HookFixture.php:107