| @@ 62-71 (lines=10) @@ | ||
| 59 | * |
|
| 60 | * @return $this|array|mixed |
|
| 61 | */ |
|
| 62 | public function value($value = null) |
|
| 63 | { |
|
| 64 | if (is_null($value)) { |
|
| 65 | return empty($this->value) ? ($this->getDefault() ?? []) : $this->value; |
|
| 66 | } |
|
| 67 | ||
| 68 | $this->value = $value; |
|
| 69 | ||
| 70 | return $this; |
|
| 71 | } |
|
| 72 | /** |
|
| 73 | * Load options from ajax results. |
|
| 74 | * |
|
| @@ 510-519 (lines=10) @@ | ||
| 507 | * |
|
| 508 | * @return mixed |
|
| 509 | */ |
|
| 510 | public function value($value = null) |
|
| 511 | { |
|
| 512 | if (is_null($value)) { |
|
| 513 | return is_null($this->value) ? $this->getDefault() : $this->value; |
|
| 514 | } |
|
| 515 | ||
| 516 | $this->value = $value; |
|
| 517 | ||
| 518 | return $this; |
|
| 519 | } |
|
| 520 | ||
| 521 | /** |
|
| 522 | * Set default value for field. |
|