1 | <?php |
||
5 | trait ModelEventsTrait |
||
6 | { |
||
7 | /** |
||
8 | * Hook into before item create. |
||
9 | * |
||
10 | * @return mixed |
||
11 | */ |
||
12 | protected function onBeforeCreate() |
||
16 | |||
17 | /** |
||
18 | * Hook into after item create. |
||
19 | * |
||
20 | * @param bool $result |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | protected function onAfterCreate($result) |
||
28 | |||
29 | /** |
||
30 | * Hook into before item update. |
||
31 | * |
||
32 | * @return mixed |
||
33 | */ |
||
34 | protected function onBeforeUpdate() |
||
38 | |||
39 | /** |
||
40 | * Hook into after item update. |
||
41 | * |
||
42 | * @param bool $result |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | protected function onAfterUpdate($result) |
||
50 | |||
51 | /** |
||
52 | * Hook into before item create or update. |
||
53 | * |
||
54 | * @return mixed |
||
55 | */ |
||
56 | protected function onBeforeSave() |
||
60 | |||
61 | /** |
||
62 | * Hook into after item create or update. |
||
63 | * |
||
64 | * @param bool $result |
||
65 | * |
||
66 | * @return void |
||
67 | */ |
||
68 | protected function onAfterSave($result) |
||
72 | |||
73 | /** |
||
74 | * Hook into before item delete. |
||
75 | * |
||
76 | * @return mixed |
||
77 | */ |
||
78 | protected function onBeforeDelete() |
||
82 | |||
83 | /** |
||
84 | * Hook into after item delete. |
||
85 | * |
||
86 | * @param bool $result |
||
87 | * |
||
88 | * @return void |
||
89 | */ |
||
90 | protected function onAfterDelete($result) |
||
94 | } |
||
95 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.