File indexing completed on 2025-03-02 05:29:19
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Dojo 0017 * @subpackage Form_Element 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 */ 0021 0022 /** Zend_Dojo_Form_Element_Slider */ 0023 // require_once 'Zend/Dojo/Form/Element/Slider.php'; 0024 0025 /** 0026 * VerticalSlider dijit 0027 * 0028 * @uses Zend_Dojo_Form_Element_Slider 0029 * @package Zend_Dojo 0030 * @subpackage Form_Element 0031 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0032 * @license http://framework.zend.com/license/new-bsd New BSD License 0033 * @version $Id$ 0034 */ 0035 class Zend_Dojo_Form_Element_VerticalSlider extends Zend_Dojo_Form_Element_Slider 0036 { 0037 /** 0038 * Use VerticalSlider dijit view helper 0039 * @var string 0040 */ 0041 public $helper = 'VerticalSlider'; 0042 0043 /** 0044 * Get left decoration data 0045 * 0046 * @return array 0047 */ 0048 public function getLeftDecoration() 0049 { 0050 if ($this->hasDijitParam('leftDecoration')) { 0051 return $this->getDijitParam('leftDecoration'); 0052 } 0053 return array(); 0054 } 0055 0056 /** 0057 * Set dijit to use with left decoration 0058 * 0059 * @param mixed $dijit 0060 * @return Zend_Dojo_Form_Element_HorizontalSlider 0061 */ 0062 public function setLeftDecorationDijit($dijit) 0063 { 0064 $decoration = $this->getLeftDecoration(); 0065 $decoration['dijit'] = (string) $dijit; 0066 $this->setDijitParam('leftDecoration', $decoration); 0067 return $this; 0068 } 0069 0070 /** 0071 * Set container to use with left decoration 0072 * 0073 * @param mixed $container 0074 * @return Zend_Dojo_Form_Element_HorizontalSlider 0075 */ 0076 public function setLeftDecorationContainer($container) 0077 { 0078 $decoration = $this->getLeftDecoration(); 0079 $decoration['container'] = (string) $container; 0080 $this->setDijitParam('leftDecoration', $decoration); 0081 return $this; 0082 } 0083 0084 /** 0085 * Set labels to use with left decoration 0086 * 0087 * @param array $labels 0088 * @return Zend_Dojo_Form_Element_HorizontalSlider 0089 */ 0090 public function setLeftDecorationLabels(array $labels) 0091 { 0092 $decoration = $this->getLeftDecoration(); 0093 $decoration['labels'] = array_values($labels); 0094 $this->setDijitParam('leftDecoration', $decoration); 0095 return $this; 0096 } 0097 0098 /** 0099 * Set params to use with left decoration 0100 * 0101 * @param array $params 0102 * @return Zend_Dojo_Form_Element_HorizontalSlider 0103 */ 0104 public function setLeftDecorationParams(array $params) 0105 { 0106 $decoration = $this->getLeftDecoration(); 0107 $decoration['params'] = $params; 0108 $this->setDijitParam('leftDecoration', $decoration); 0109 return $this; 0110 } 0111 0112 /** 0113 * Set attribs to use with left decoration 0114 * 0115 * @param array $attribs 0116 * @return Zend_Dojo_Form_Element_HorizontalSlider 0117 */ 0118 public function setLeftDecorationAttribs(array $attribs) 0119 { 0120 $decoration = $this->getLeftDecoration(); 0121 $decoration['attribs'] = $attribs; 0122 $this->setDijitParam('leftDecoration', $decoration); 0123 return $this; 0124 } 0125 0126 /** 0127 * Get right decoration data 0128 * 0129 * @return array 0130 */ 0131 public function getRightDecoration() 0132 { 0133 if ($this->hasDijitParam('rightDecoration')) { 0134 return $this->getDijitParam('rightDecoration'); 0135 } 0136 return array(); 0137 } 0138 0139 /** 0140 * Set dijit to use with right decoration 0141 * 0142 * @param mixed $dijit 0143 * @return Zend_Dojo_Form_Element_HorizontalSlider 0144 */ 0145 public function setRightDecorationDijit($dijit) 0146 { 0147 $decoration = $this->getRightDecoration(); 0148 $decoration['dijit'] = (string) $dijit; 0149 $this->setDijitParam('rightDecoration', $decoration); 0150 return $this; 0151 } 0152 0153 /** 0154 * Set container to use with right decoration 0155 * 0156 * @param mixed $container 0157 * @return Zend_Dojo_Form_Element_HorizontalSlider 0158 */ 0159 public function setRightDecorationContainer($container) 0160 { 0161 $decoration = $this->getRightDecoration(); 0162 $decoration['container'] = (string) $container; 0163 $this->setDijitParam('rightDecoration', $decoration); 0164 return $this; 0165 } 0166 0167 /** 0168 * Set labels to use with right decoration 0169 * 0170 * @param array $labels 0171 * @return Zend_Dojo_Form_Element_HorizontalSlider 0172 */ 0173 public function setRightDecorationLabels(array $labels) 0174 { 0175 $decoration = $this->getRightDecoration(); 0176 $decoration['labels'] = array_values($labels); 0177 $this->setDijitParam('rightDecoration', $decoration); 0178 return $this; 0179 } 0180 0181 /** 0182 * Set params to use with right decoration 0183 * 0184 * @param array $params 0185 * @return Zend_Dojo_Form_Element_HorizontalSlider 0186 */ 0187 public function setRightDecorationParams(array $params) 0188 { 0189 $decoration = $this->getRightDecoration(); 0190 $decoration['params'] = $params; 0191 $this->setDijitParam('rightDecoration', $decoration); 0192 return $this; 0193 } 0194 0195 /** 0196 * Set attribs to use with right decoration 0197 * 0198 * @param array $attribs 0199 * @return Zend_Dojo_Form_Element_HorizontalSlider 0200 */ 0201 public function setRightDecorationAttribs(array $attribs) 0202 { 0203 $decoration = $this->getRightDecoration(); 0204 $decoration['attribs'] = $attribs; 0205 $this->setDijitParam('rightDecoration', $decoration); 0206 return $this; 0207 } 0208 }