1 | <?php |
||
33 | class ProcessComponent extends AppComponent |
||
34 | { |
||
35 | |||
36 | const PRIMARY_KEY = 'id'; |
||
37 | const EVENT_NAME_BEFORE = 'Before'; |
||
38 | const EVENT_NAME_AFTER = 'After'; |
||
39 | |||
40 | /** |
||
41 | * Other Components this component uses. |
||
42 | * |
||
43 | * @var array |
||
44 | */ |
||
45 | public $components = [ |
||
46 | 'Core.Flash' |
||
47 | ]; |
||
48 | |||
49 | /** |
||
50 | * Get actual request vars for process. |
||
51 | * |
||
52 | * @param string $name |
||
53 | * @param string $primaryKey |
||
54 | * @return array |
||
55 | */ |
||
56 | public function getRequestVars($name, $primaryKey = self::PRIMARY_KEY) |
||
65 | |||
66 | /** |
||
67 | * Constructor hook method. |
||
68 | * |
||
69 | * @param array $config |
||
70 | * @return void |
||
71 | */ |
||
72 | public function initialize(array $config) |
||
93 | |||
94 | /** |
||
95 | * Make process. |
||
96 | * |
||
97 | * @param Table $table |
||
98 | * @param string $action |
||
99 | * @param array $ids |
||
100 | * @param array $options |
||
101 | * @return \Cake\Http\Response|null |
||
102 | * |
||
103 | * @throws \Aura\Intl\Exception |
||
104 | */ |
||
105 | public function make(Table $table, $action, array $ids = [], array $options = []) |
||
134 | |||
135 | /** |
||
136 | * Setup default action messages. |
||
137 | * |
||
138 | * @param int $count |
||
139 | * @return array |
||
140 | * |
||
141 | * @throws \Aura\Intl\Exception |
||
142 | */ |
||
143 | protected function _getDefaultMessages($count) |
||
172 | |||
173 | /** |
||
174 | * Get event name by data. |
||
175 | * |
||
176 | * @param string $action |
||
177 | * @param string $event |
||
178 | * @return string |
||
179 | */ |
||
180 | protected function _getEventName($action, $event = self::EVENT_NAME_BEFORE) |
||
196 | |||
197 | /** |
||
198 | * Get ids by request. |
||
199 | * |
||
200 | * @param array $ids |
||
201 | * @param string $primaryKey |
||
202 | * @return array |
||
203 | */ |
||
204 | protected function _getIds(array $ids, $primaryKey = self::PRIMARY_KEY) |
||
215 | |||
216 | /** |
||
217 | * Create and merge actual process options. |
||
218 | * |
||
219 | * @param array $options |
||
220 | * @param int|string $count |
||
221 | * @return array |
||
222 | * |
||
223 | * @throws \Aura\Intl\Exception |
||
224 | */ |
||
225 | protected function _getOptions(array $options, $count) |
||
230 | |||
231 | /** |
||
232 | * Load process behavior. |
||
233 | * |
||
234 | * @param Table $table |
||
235 | */ |
||
236 | protected function _loadBehavior(Table $table) |
||
243 | |||
244 | /** |
||
245 | * Controller process. |
||
246 | * |
||
247 | * @param string $action |
||
248 | * @param Data $messages |
||
249 | * @param array $redirect |
||
250 | * @param array $ids |
||
251 | * @return \Cake\Http\Response|null |
||
252 | * |
||
253 | * @throws \Aura\Intl\Exception |
||
254 | */ |
||
255 | protected function _process($action, Data $messages, array $redirect, array $ids) |
||
273 | } |
||
274 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.