1 | <?php |
||
9 | abstract class FormModel extends Form |
||
10 | { |
||
11 | /** |
||
12 | * Customise the check() method to use own methods. |
||
13 | * |
||
14 | * @param callable $callIfSuccess handler to call if function returns true. |
||
15 | * @param callable $callIfFail handler to call if function returns true. |
||
16 | */ |
||
17 | public function check($callIfSuccess = null, $callIfFail = null) |
||
21 | |||
22 | |||
23 | |||
24 | /** |
||
25 | * Callback for submitting the form. |
||
26 | */ |
||
27 | abstract public function callbackSubmit(); |
||
28 | |||
29 | |||
30 | |||
31 | /** |
||
32 | * Callback What to do if the form was submitted successfully? |
||
33 | */ |
||
34 | public function callbackSuccess() |
||
40 | |||
41 | |||
42 | |||
43 | /** |
||
44 | * Callback What to do when submitted form could not be processed? |
||
45 | */ |
||
46 | public function callbackFail() |
||
52 | } |
||
53 |