| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields;
- /**
- * Number Field controler
- *
- * @author Sławomir Miśkowicz <slawomir@modulesgarden.com>
- */
- class Range extends BaseField
- {
- protected $id = 'range';
- protected $name = 'range';
- protected $maxValue = null;
- protected $minValue = null;
- protected $outputVisible = true;
- public function __construct($id = null, $minValue = null, $maxValue = null)
- {
- parent::__construct($id);
- $this->minValue = $minValue;
- $this->maxValue = $maxValue;
- }
- public function getMinValue()
- {
- return $this->minValue;
- }
- public function setMinValue($minValue)
- {
- $this->minValue = $minValue;
- }
- public function getMaxValue()
- {
- return $this->maxValue;
- }
- public function setMaxValue($maxValue)
- {
- $this->maxValue = $maxValue;
- }
- /**
- * @param bool $visible
- */
- public function setOutputVisible($visible = true)
- {
- $this->outputVisible = $visible;
- }
- /**
- * @return bool
- */
- public function isOutputVisible()
- {
- return $this->outputVisible;
- }
- public function getOutputLabel(){
- if($this->getHtmlAttribute('data-label'.$this->getValue())){
- return $this->getHtmlAttribute('data-label'.$this->getValue());
- }
- return $this->getValue();
- }
- }
|