1 | <?php |
||
9 | class CFormExample extends \Mos\HTMLForm\CForm |
||
10 | { |
||
11 | use \Anax\DI\TInjectionaware, |
||
12 | \Anax\MVC\TRedirectHelpers; |
||
13 | |||
14 | |||
15 | |||
16 | /** |
||
17 | * Constructor |
||
18 | * |
||
19 | */ |
||
20 | public function __construct() |
||
49 | |||
50 | |||
51 | |||
52 | /** |
||
53 | * Customise the check() method. |
||
54 | * |
||
55 | * @param callable $callIfSuccess handler to call if function returns true. |
||
56 | * @param callable $callIfFail handler to call if function returns true. |
||
57 | */ |
||
58 | public function check($callIfSuccess = null, $callIfFail = null) |
||
62 | |||
63 | |||
64 | |||
65 | /** |
||
66 | * Callback for submit-button. |
||
67 | * |
||
68 | */ |
||
69 | public function callbackSubmit() |
||
78 | |||
79 | |||
80 | |||
81 | /** |
||
82 | * Callback for submit-button. |
||
83 | * |
||
84 | */ |
||
85 | public function callbackSubmitFail() |
||
90 | |||
91 | |||
92 | |||
93 | /** |
||
94 | * Callback What to do if the form was submitted? |
||
95 | * |
||
96 | */ |
||
97 | public function callbackSuccess() |
||
102 | |||
103 | |||
104 | |||
105 | /** |
||
106 | * Callback What to do when form could not be processed? |
||
107 | * |
||
108 | */ |
||
109 | public function callbackFail() |
||
114 | } |
||
115 |