‪TYPO3CMS  10.4
HookFixture.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 
27 {
31  protected ‪$invocations = [];
32 
36  public function ‪purge()
37  {
38  $this->invocations = [];
39  }
40 
45  public function ‪findInvocationsByMethodName(string $methodName)
46  {
47  return $this->invocations[$methodName] ?? null;
48  }
49 
53  public function ‪processDatamap_beforeStart(‪DataHandler $dataHandler)
54  {
55  $this->invocations[__FUNCTION__][] = true;
56  }
57 
64  public function ‪processDatamap_preProcessFieldArray(array $fieldArray, string $table, $id, ‪DataHandler $dataHandler)
65  {
66  $this->invocations[__FUNCTION__][] = [
67  'fieldArray' => $fieldArray,
68  'table' => $table,
69  'id' => $id,
70  ];
71  }
72 
80  public function ‪processDatamap_postProcessFieldArray(string $status, string $table, $id, array $fieldArray, ‪DataHandler $dataHandler)
81  {
82  $this->invocations[__FUNCTION__][] = [
83  'status' => $status,
84  'table' => $table,
85  'id' => $id,
86  'fieldArray' => $fieldArray,
87  ];
88  }
89 
97  public function ‪processDatamap_afterDatabaseOperations(string $status, string $table, $id, array $fieldArray, ‪DataHandler $dataHandler)
98  {
99  $this->invocations[__FUNCTION__][] = [
100  'status' => $status,
101  'table' => $table,
102  'id' => $id,
103  'fieldArray' => $fieldArray,
104  ];
105  }
106 
110  public function ‪processDatamap_afterAllOperations(‪DataHandler $dataHandler)
111  {
112  $this->invocations[__FUNCTION__][] = true;
113  }
114 
118  public function ‪processCmdmap_beforeStart(‪DataHandler $dataHandler)
119  {
120  $this->invocations[__FUNCTION__][] = true;
121  }
122 
131  public function ‪processCmdmap_preProcess(string $command, string $table, $id, $value, ‪DataHandler $dataHandler, $pasteUpdate)
132  {
133  $this->invocations[__FUNCTION__][] = [
134  'command' => $command,
135  'table' => $table,
136  'id' => $id,
137  'value' => $value,
138  'pasteUpdate' => $pasteUpdate,
139  ];
140  }
141 
151  public function ‪processCmdmap(string $command, string $table, $id, $value, bool $commandIsProcessed, ‪DataHandler $dataHandler, $pasteUpdate)
152  {
153  $this->invocations[__FUNCTION__][] = [
154  'command' => $command,
155  'table' => $table,
156  'id' => $id,
157  'value' => $value,
158  'commandIsProcessed' => $commandIsProcessed,
159  'pasteUpdate' => $pasteUpdate,
160  ];
161  }
162 
172  public function ‪processCmdmap_postProcess(string $command, string $table, $id, $value, ‪DataHandler $dataHandler, $pasteUpdate, $pasteDatamap)
173  {
174  $this->invocations[__FUNCTION__][] = [
175  'command' => $command,
176  'table' => $table,
177  'id' => $id,
178  'value' => $value,
179  'pasteUpdate' => $pasteUpdate,
180  'pasteDatamap' => $pasteDatamap,
181  ];
182  }
183 
187  public function ‪processCmdmap_afterFinish(‪DataHandler $dataHandler)
188  {
189  $this->invocations[__FUNCTION__][] = true;
190  }
191 }
‪TYPO3\CMS\Core\DataHandling\DataHandler
Definition: DataHandler.php:84
‪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:96
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\purge
‪purge()
Definition: HookFixture.php:35
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processDatamap_preProcessFieldArray
‪processDatamap_preProcessFieldArray(array $fieldArray, string $table, $id, DataHandler $dataHandler)
Definition: HookFixture.php:63
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures
Definition: HookFixture.php:18
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture
Definition: HookFixture.php:27
‪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:171
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processCmdmap_afterFinish
‪processCmdmap_afterFinish(DataHandler $dataHandler)
Definition: HookFixture.php:186
‪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:79
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:23
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\findInvocationsByMethodName
‪array null findInvocationsByMethodName(string $methodName)
Definition: HookFixture.php:44
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\$invocations
‪array[] $invocations
Definition: HookFixture.php:30
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processDatamap_beforeStart
‪processDatamap_beforeStart(DataHandler $dataHandler)
Definition: HookFixture.php:52
‪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:130
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processCmdmap_beforeStart
‪processCmdmap_beforeStart(DataHandler $dataHandler)
Definition: HookFixture.php:117
‪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:150
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\DataHandler\Fixtures\HookFixture\processDatamap_afterAllOperations
‪processDatamap_afterAllOperations(DataHandler $dataHandler)
Definition: HookFixture.php:109