TYPO3 CMS  TYPO3_8-7
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 }
processDatamap_preProcessFieldArray(array $fieldArray, string $table, $id, DataHandler $dataHandler)
Definition: HookFixture.php:62
processDatamap_afterDatabaseOperations(string $status, string $table, $id, array $fieldArray, DataHandler $dataHandler)
Definition: HookFixture.php:95
processDatamap_postProcessFieldArray(string $status, string $table, $id, array $fieldArray, DataHandler $dataHandler)
Definition: HookFixture.php:78
processCmdmap_postProcess(string $command, string $table, $id, $value, DataHandler $dataHandler, $pasteUpdate, $pasteDatamap)
processCmdmap(string $command, string $table, $id, $value, bool $commandIsProcessed, DataHandler $dataHandler, $pasteUpdate)
processCmdmap_preProcess(string $command, string $table, $id, $value, DataHandler $dataHandler, $pasteUpdate)