| 1 | <?php |
||
| 9 | class FW |
||
| 10 | { |
||
| 11 | |||
| 12 | private static $forms = array(); |
||
| 13 | private static $ajaxMethods = array(); |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Registers given form globally |
||
| 17 | * |
||
| 18 | * @param Form $form |
||
| 19 | */ |
||
| 20 | static function registerForm (Form $form) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Retrieves a form by its slug |
||
| 28 | * |
||
| 29 | * @param string $slug |
||
| 30 | * |
||
| 31 | * @return Form|null form or null if not found |
||
| 32 | */ |
||
| 33 | static function getForm ($slug) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Lists slugs of all ajax methods |
||
| 44 | * @return array |
||
| 45 | */ |
||
| 46 | static function listAjaxMethods () |
||
| 50 | |||
| 51 | /** |
||
| 52 | * If any of your form callbacks uses header redirects, make sure to call before_content() and after_content() |
||
| 53 | * before output starts and after output ends. |
||
| 54 | */ |
||
| 55 | static function beforeContent () |
||
| 59 | |||
| 60 | /** |
||
| 61 | * If any of your form callbacks uses header redirects, make sure to call before_content() and after_content() |
||
| 62 | * before output starts and after output ends. |
||
| 63 | */ |
||
| 64 | static function afterContent () |
||
| 68 | } |