|
1 <?php |
|
2 /** |
|
3 * Zend Framework |
|
4 * |
|
5 * LICENSE |
|
6 * |
|
7 * This source file is subject to the new BSD license that is bundled |
|
8 * with this package in the file LICENSE.txt. |
|
9 * It is also available through the world-wide-web at this URL: |
|
10 * http://framework.zend.com/license/new-bsd |
|
11 * If you did not receive a copy of the license and are unable to |
|
12 * obtain it through the world-wide-web, please send an email |
|
13 * to license@zend.com so we can send you a copy immediately. |
|
14 * |
|
15 * @category Zend |
|
16 * @package Zend_Dojo |
|
17 * @subpackage Form_Element |
|
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
20 */ |
|
21 |
|
22 /** Zend_Dojo_Form_Element_Dijit */ |
|
23 require_once 'Zend/Dojo/Form/Element/Dijit.php'; |
|
24 |
|
25 /** |
|
26 * Abstract Slider dijit |
|
27 * |
|
28 * @uses Zend_Dojo_Form_Element_Dijit |
|
29 * @package Zend_Dojo |
|
30 * @subpackage Form_Element |
|
31 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
|
32 * @license http://framework.zend.com/license/new-bsd New BSD License |
|
33 * @version $Id: Slider.php 20096 2010-01-06 02:05:09Z bkarwin $ |
|
34 */ |
|
35 abstract class Zend_Dojo_Form_Element_Slider extends Zend_Dojo_Form_Element_Dijit |
|
36 { |
|
37 /** |
|
38 * Set clickSelect flag |
|
39 * |
|
40 * @param bool $clickSelect |
|
41 * @return Zend_Dojo_Form_Element_TextBox |
|
42 */ |
|
43 public function setClickSelect($flag) |
|
44 { |
|
45 $this->setDijitParam('clickSelect', (bool) $flag); |
|
46 return $this; |
|
47 } |
|
48 |
|
49 /** |
|
50 * Retrieve clickSelect flag |
|
51 * |
|
52 * @return bool |
|
53 */ |
|
54 public function getClickSelect() |
|
55 { |
|
56 if (!$this->hasDijitParam('clickSelect')) { |
|
57 return false; |
|
58 } |
|
59 return $this->getDijitParam('clickSelect'); |
|
60 } |
|
61 |
|
62 /** |
|
63 * Set intermediateChanges flag |
|
64 * |
|
65 * @param bool $intermediateChanges |
|
66 * @return Zend_Dojo_Form_Element_TextBox |
|
67 */ |
|
68 public function setIntermediateChanges($flag) |
|
69 { |
|
70 $this->setDijitParam('intermediateChanges', (bool) $flag); |
|
71 return $this; |
|
72 } |
|
73 |
|
74 /** |
|
75 * Retrieve intermediateChanges flag |
|
76 * |
|
77 * @return bool |
|
78 */ |
|
79 public function getIntermediateChanges() |
|
80 { |
|
81 if (!$this->hasDijitParam('intermediateChanges')) { |
|
82 return false; |
|
83 } |
|
84 return $this->getDijitParam('intermediateChanges'); |
|
85 } |
|
86 |
|
87 /** |
|
88 * Set showButtons flag |
|
89 * |
|
90 * @param bool $showButtons |
|
91 * @return Zend_Dojo_Form_Element_TextBox |
|
92 */ |
|
93 public function setShowButtons($flag) |
|
94 { |
|
95 $this->setDijitParam('showButtons', (bool) $flag); |
|
96 return $this; |
|
97 } |
|
98 |
|
99 /** |
|
100 * Retrieve showButtons flag |
|
101 * |
|
102 * @return bool |
|
103 */ |
|
104 public function getShowButtons() |
|
105 { |
|
106 if (!$this->hasDijitParam('showButtons')) { |
|
107 return false; |
|
108 } |
|
109 return $this->getDijitParam('showButtons'); |
|
110 } |
|
111 |
|
112 /** |
|
113 * Set discreteValues |
|
114 * |
|
115 * @param int $value |
|
116 * @return Zend_Dojo_Form_Element_TextBox |
|
117 */ |
|
118 public function setDiscreteValues($value) |
|
119 { |
|
120 $this->setDijitParam('discreteValues', (int) $value); |
|
121 return $this; |
|
122 } |
|
123 |
|
124 /** |
|
125 * Retrieve discreteValues |
|
126 * |
|
127 * @return int|null |
|
128 */ |
|
129 public function getDiscreteValues() |
|
130 { |
|
131 return $this->getDijitParam('discreteValues'); |
|
132 } |
|
133 |
|
134 /** |
|
135 * Set maximum |
|
136 * |
|
137 * @param int $value |
|
138 * @return Zend_Dojo_Form_Element_TextBox |
|
139 */ |
|
140 public function setMaximum($value) |
|
141 { |
|
142 $this->setDijitParam('maximum', (int) $value); |
|
143 return $this; |
|
144 } |
|
145 |
|
146 /** |
|
147 * Retrieve maximum |
|
148 * |
|
149 * @return int|null |
|
150 */ |
|
151 public function getMaximum() |
|
152 { |
|
153 return $this->getDijitParam('maximum'); |
|
154 } |
|
155 |
|
156 /** |
|
157 * Set minimum |
|
158 * |
|
159 * @param int $value |
|
160 * @return Zend_Dojo_Form_Element_TextBox |
|
161 */ |
|
162 public function setMinimum($value) |
|
163 { |
|
164 $this->setDijitParam('minimum', (int) $value); |
|
165 return $this; |
|
166 } |
|
167 |
|
168 /** |
|
169 * Retrieve minimum |
|
170 * |
|
171 * @return int|null |
|
172 */ |
|
173 public function getMinimum() |
|
174 { |
|
175 return $this->getDijitParam('minimum'); |
|
176 } |
|
177 |
|
178 /** |
|
179 * Set pageIncrement |
|
180 * |
|
181 * @param int $value |
|
182 * @return Zend_Dojo_Form_Element_TextBox |
|
183 */ |
|
184 public function setPageIncrement($value) |
|
185 { |
|
186 $this->setDijitParam('pageIncrement', (int) $value); |
|
187 return $this; |
|
188 } |
|
189 |
|
190 /** |
|
191 * Retrieve pageIncrement |
|
192 * |
|
193 * @return int|null |
|
194 */ |
|
195 public function getPageIncrement() |
|
196 { |
|
197 return $this->getDijitParam('pageIncrement'); |
|
198 } |
|
199 } |