TYPO3 CMS  TYPO3_7-6
HookFixture.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
19 
24 {
28  protected $invocations = [];
29 
33  public function purge()
34  {
35  $this->invocations = [];
36  }
37 
42  public function findInvocationsByMethodName($methodName)
43  {
44  if (isset($this->invocations[$methodName])) {
45  return $this->invocations[$methodName];
46  }
47  return 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, $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($status, $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($status, $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($command, $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($command, $table, $id, $value, $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($command, $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 }
processDatamap_postProcessFieldArray($status, $table, $id, array $fieldArray, DataHandler $dataHandler)
Definition: HookFixture.php:80
processCmdmap_postProcess($command, $table, $id, $value, DataHandler $dataHandler, $pasteUpdate, $pasteDatamap)
processCmdmap_preProcess($command, $table, $id, $value, DataHandler $dataHandler, $pasteUpdate)
processDatamap_preProcessFieldArray(array $fieldArray, $table, $id, DataHandler $dataHandler)
Definition: HookFixture.php:64
processCmdmap($command, $table, $id, $value, $commandIsProcessed, DataHandler $dataHandler, $pasteUpdate)
processDatamap_afterDatabaseOperations($status, $table, $id, array $fieldArray, DataHandler $dataHandler)
Definition: HookFixture.php:97