| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?php
- namespace ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields;
- /**
- * Select field controler
- *
- * @author Sławomir Miśkowicz <slawomir@modulesgarden.com>
- */
- class Dropdown extends BaseField
- {
- protected $id = 'dropdown';
- protected $name = 'dropdown';
- protected $multiple = false;
- protected $class = ['lu-form-control'];
-
- protected $availableValues = [];
- protected $htmlAttributes = [
- '@change' => 'selectChangeAction($event)'
- ];
- public function setSelectedValue($value)
- {
- $this->value = $value;
-
- return $this;
- }
-
- public function setAvailableValues($values)
- {
- if(is_array($values))
- {
- $this->availableValues = $values;
- }
-
- return $this;
- }
-
- public function getAvailableValues()
- {
- return $this->availableValues;
- }
-
- public function isMultiple()
- {
- return $this->multiple;
- }
-
- public function enableMultiple()
- {
- $this->multiple = true;
-
- return $this;
- }
-
- public function disableMultiple()
- {
- $this->multiple = false;
-
- return $this;
- }
- }
|