File indexing completed on 2025-03-09 05:25:47
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_Dijit */ 0023 // require_once 'Zend/Dojo/Form/Element/Dijit.php'; 0024 0025 /** 0026 * Abstract Slider dijit 0027 * 0028 * @uses Zend_Dojo_Form_Element_Dijit 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 abstract class Zend_Dojo_Form_Element_Slider extends Zend_Dojo_Form_Element_Dijit 0036 { 0037 /** 0038 * Set clickSelect flag 0039 * 0040 * @param bool $clickSelect 0041 * @return Zend_Dojo_Form_Element_TextBox 0042 */ 0043 public function setClickSelect($flag) 0044 { 0045 $this->setDijitParam('clickSelect', (bool) $flag); 0046 return $this; 0047 } 0048 0049 /** 0050 * Retrieve clickSelect flag 0051 * 0052 * @return bool 0053 */ 0054 public function getClickSelect() 0055 { 0056 if (!$this->hasDijitParam('clickSelect')) { 0057 return false; 0058 } 0059 return $this->getDijitParam('clickSelect'); 0060 } 0061 0062 /** 0063 * Set intermediateChanges flag 0064 * 0065 * @param bool $intermediateChanges 0066 * @return Zend_Dojo_Form_Element_TextBox 0067 */ 0068 public function setIntermediateChanges($flag) 0069 { 0070 $this->setDijitParam('intermediateChanges', (bool) $flag); 0071 return $this; 0072 } 0073 0074 /** 0075 * Retrieve intermediateChanges flag 0076 * 0077 * @return bool 0078 */ 0079 public function getIntermediateChanges() 0080 { 0081 if (!$this->hasDijitParam('intermediateChanges')) { 0082 return false; 0083 } 0084 return $this->getDijitParam('intermediateChanges'); 0085 } 0086 0087 /** 0088 * Set showButtons flag 0089 * 0090 * @param bool $showButtons 0091 * @return Zend_Dojo_Form_Element_TextBox 0092 */ 0093 public function setShowButtons($flag) 0094 { 0095 $this->setDijitParam('showButtons', (bool) $flag); 0096 return $this; 0097 } 0098 0099 /** 0100 * Retrieve showButtons flag 0101 * 0102 * @return bool 0103 */ 0104 public function getShowButtons() 0105 { 0106 if (!$this->hasDijitParam('showButtons')) { 0107 return false; 0108 } 0109 return $this->getDijitParam('showButtons'); 0110 } 0111 0112 /** 0113 * Set discreteValues 0114 * 0115 * @param int $value 0116 * @return Zend_Dojo_Form_Element_TextBox 0117 */ 0118 public function setDiscreteValues($value) 0119 { 0120 $this->setDijitParam('discreteValues', (int) $value); 0121 return $this; 0122 } 0123 0124 /** 0125 * Retrieve discreteValues 0126 * 0127 * @return int|null 0128 */ 0129 public function getDiscreteValues() 0130 { 0131 return $this->getDijitParam('discreteValues'); 0132 } 0133 0134 /** 0135 * Set maximum 0136 * 0137 * @param int $value 0138 * @return Zend_Dojo_Form_Element_TextBox 0139 */ 0140 public function setMaximum($value) 0141 { 0142 $this->setDijitParam('maximum', (int) $value); 0143 return $this; 0144 } 0145 0146 /** 0147 * Retrieve maximum 0148 * 0149 * @return int|null 0150 */ 0151 public function getMaximum() 0152 { 0153 return $this->getDijitParam('maximum'); 0154 } 0155 0156 /** 0157 * Set minimum 0158 * 0159 * @param int $value 0160 * @return Zend_Dojo_Form_Element_TextBox 0161 */ 0162 public function setMinimum($value) 0163 { 0164 $this->setDijitParam('minimum', (int) $value); 0165 return $this; 0166 } 0167 0168 /** 0169 * Retrieve minimum 0170 * 0171 * @return int|null 0172 */ 0173 public function getMinimum() 0174 { 0175 return $this->getDijitParam('minimum'); 0176 } 0177 0178 /** 0179 * Set pageIncrement 0180 * 0181 * @param int $value 0182 * @return Zend_Dojo_Form_Element_TextBox 0183 */ 0184 public function setPageIncrement($value) 0185 { 0186 $this->setDijitParam('pageIncrement', (int) $value); 0187 return $this; 0188 } 0189 0190 /** 0191 * Retrieve pageIncrement 0192 * 0193 * @return int|null 0194 */ 0195 public function getPageIncrement() 0196 { 0197 return $this->getDijitParam('pageIncrement'); 0198 } 0199 }