1 | <?php |
||
14 | class Options extends \StrokerForm\Renderer\Options |
||
15 | { |
||
16 | /** |
||
17 | * @var array |
||
18 | */ |
||
19 | private $validateOptions = array(); |
||
20 | |||
21 | /** |
||
22 | * @var bool |
||
23 | */ |
||
24 | private $useTwitterBootstrap = true; |
||
25 | |||
26 | /** |
||
27 | * @var string |
||
28 | */ |
||
29 | private $initializeTrigger = '$(document).ready(function(){%s});'; |
||
30 | |||
31 | /** |
||
32 | * @var array |
||
33 | */ |
||
34 | private $customValidationRules = array(); |
||
35 | |||
36 | /** |
||
37 | * @var boolean |
||
38 | */ |
||
39 | private $disableAjaxFallback = false; |
||
40 | |||
41 | /** |
||
42 | * @return array |
||
43 | */ |
||
44 | public function getValidateOptions() |
||
48 | |||
49 | /** |
||
50 | * Overwrite default options for the jquery.validate plugin |
||
51 | * See: http://docs.jquery.com/Plugins/Validation#Options_for_the_validate.28.29_method |
||
52 | * |
||
53 | * @param array $validateOptions |
||
54 | */ |
||
55 | public function setValidateOptions($validateOptions) |
||
59 | |||
60 | /** |
||
61 | * @param string $option |
||
62 | */ |
||
63 | public function addValidateOption($option) |
||
67 | |||
68 | /** |
||
69 | * @return bool |
||
70 | */ |
||
71 | public function isUseTwitterBootstrap() |
||
75 | |||
76 | /** |
||
77 | * @param bool $useTwitterBootstrap |
||
78 | */ |
||
79 | public function setUseTwitterBootstrap($useTwitterBootstrap) |
||
83 | |||
84 | /** |
||
85 | * @return string |
||
86 | */ |
||
87 | public function getInitializeTrigger() |
||
91 | |||
92 | /** |
||
93 | * @param string $initializeTrigger |
||
94 | * |
||
95 | * @return Options |
||
96 | */ |
||
97 | public function setInitializeTrigger($initializeTrigger) |
||
102 | |||
103 | /** |
||
104 | * @return array |
||
105 | */ |
||
106 | public function getCustomValidationRules() |
||
110 | |||
111 | /** |
||
112 | * @param array $customValidationRules |
||
113 | * |
||
114 | * @return Options $this |
||
115 | */ |
||
116 | public function setCustomValidationRules(array $customValidationRules) |
||
122 | |||
123 | /** |
||
124 | * @return boolean |
||
125 | */ |
||
126 | public function isDisableAjaxFallback() |
||
130 | |||
131 | /** |
||
132 | * @param boolean $disableAjaxFallback |
||
133 | */ |
||
134 | public function setDisableAjaxFallback($disableAjaxFallback) |
||
138 | } |
||
139 |