| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields;
- /**
- * Select field controler
- *
- * @autor ThurData <info@thurdata.ch>
- */
- class Select extends BaseField
- {
- protected $id = 'select';
- protected $name = 'select';
- protected $multiple = false;
-
- 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;
- }
- }
|