*prechod na novsiu verziu ZF
[sport-group.git] / library / Zend / Dojo / Form / Element / HorizontalSlider.php
blobbe53e79f34da3305359c5d8c48144baee9f28d13
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
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.
15 * @category Zend
16 * @package Zend_Dojo
17 * @subpackage Form_Element
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
22 /** Zend_Dojo_Form_Element_Slider */
23 require_once 'Zend/Dojo/Form/Element/Slider.php';
25 /**
26 * HorizontalSlider dijit
28 * @uses Zend_Dojo_Form_Element_Slider
29 * @package Zend_Dojo
30 * @subpackage Form_Element
31 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
32 * @license http://framework.zend.com/license/new-bsd New BSD License
33 * @version $Id: HorizontalSlider.php 16204 2009-06-21 18:58:29Z thomas $
35 class Zend_Dojo_Form_Element_HorizontalSlider extends Zend_Dojo_Form_Element_Slider
37 /**
38 * Use HorizontalSlider dijit view helper
39 * @var string
41 public $helper = 'HorizontalSlider';
43 /**
44 * Get top decoration data
46 * @return array
48 public function getTopDecoration()
50 if ($this->hasDijitParam('topDecoration')) {
51 return $this->getDijitParam('topDecoration');
53 return array();
56 /**
57 * Set dijit to use with top decoration
59 * @param mixed $dijit
60 * @return Zend_Dojo_Form_Element_HorizontalSlider
62 public function setTopDecorationDijit($dijit)
64 $decoration = $this->getTopDecoration();
65 $decoration['dijit'] = (string) $dijit;
66 $this->setDijitParam('topDecoration', $decoration);
67 return $this;
70 /**
71 * Set container to use with top decoration
73 * @param mixed $container
74 * @return Zend_Dojo_Form_Element_HorizontalSlider
76 public function setTopDecorationContainer($container)
78 $decoration = $this->getTopDecoration();
79 $decoration['container'] = (string) $container;
80 $this->setDijitParam('topDecoration', $decoration);
81 return $this;
84 /**
85 * Set labels to use with top decoration
87 * @param array $labels
88 * @return Zend_Dojo_Form_Element_HorizontalSlider
90 public function setTopDecorationLabels(array $labels)
92 $decoration = $this->getTopDecoration();
93 $decoration['labels'] = array_values($labels);
94 $this->setDijitParam('topDecoration', $decoration);
95 return $this;
98 /**
99 * Set params to use with top decoration
101 * @param array $params
102 * @return Zend_Dojo_Form_Element_HorizontalSlider
104 public function setTopDecorationParams(array $params)
106 $decoration = $this->getTopDecoration();
107 $decoration['params'] = $params;
108 $this->setDijitParam('topDecoration', $decoration);
109 return $this;
113 * Set attribs to use with top decoration
115 * @param array $attribs
116 * @return Zend_Dojo_Form_Element_HorizontalSlider
118 public function setTopDecorationAttribs(array $attribs)
120 $decoration = $this->getTopDecoration();
121 $decoration['attribs'] = $attribs;
122 $this->setDijitParam('topDecoration', $decoration);
123 return $this;
127 * Get bottom decoration data
129 * @return array
131 public function getBottomDecoration()
133 if ($this->hasDijitParam('bottomDecoration')) {
134 return $this->getDijitParam('bottomDecoration');
136 return array();
140 * Set dijit to use with bottom decoration
142 * @param mixed $dijit
143 * @return Zend_Dojo_Form_Element_HorizontalSlider
145 public function setBottomDecorationDijit($dijit)
147 $decoration = $this->getBottomDecoration();
148 $decoration['dijit'] = (string) $dijit;
149 $this->setDijitParam('bottomDecoration', $decoration);
150 return $this;
154 * Set container to use with bottom decoration
156 * @param mixed $container
157 * @return Zend_Dojo_Form_Element_HorizontalSlider
159 public function setBottomDecorationContainer($container)
161 $decoration = $this->getBottomDecoration();
162 $decoration['container'] = (string) $container;
163 $this->setDijitParam('bottomDecoration', $decoration);
164 return $this;
168 * Set labels to use with bottom decoration
170 * @param array $labels
171 * @return Zend_Dojo_Form_Element_HorizontalSlider
173 public function setBottomDecorationLabels(array $labels)
175 $decoration = $this->getBottomDecoration();
176 $decoration['labels'] = array_values($labels);
177 $this->setDijitParam('bottomDecoration', $decoration);
178 return $this;
182 * Set params to use with bottom decoration
184 * @param array $params
185 * @return Zend_Dojo_Form_Element_HorizontalSlider
187 public function setBottomDecorationParams(array $params)
189 $decoration = $this->getBottomDecoration();
190 $decoration['params'] = $params;
191 $this->setDijitParam('bottomDecoration', $decoration);
192 return $this;
196 * Set attribs to use with bottom decoration
198 * @param array $attribs
199 * @return Zend_Dojo_Form_Element_HorizontalSlider
201 public function setBottomDecorationAttribs(array $attribs)
203 $decoration = $this->getBottomDecoration();
204 $decoration['attribs'] = $attribs;
205 $this->setDijitParam('bottomDecoration', $decoration);
206 return $this;