| @@ 154-163 (lines=10) @@ | ||
| 151 | * | |
| 152 | * @return $this|array|mixed | |
| 153 | */ | |
| 154 | public function value($value = null) | |
| 155 |     { | |
| 156 |         if (is_null($value)) { | |
| 157 | return empty($this->value) ? ($this->getDefault() ?? []) : $this->value; | |
| 158 | } | |
| 159 | ||
| 160 | $this->value = (array) $value; | |
| 161 | ||
| 162 | return $this; | |
| 163 | } | |
| 164 | ||
| 165 | /** | |
| 166 |      * {@inheritdoc} | |
| @@ 581-590 (lines=10) @@ | ||
| 578 | * | |
| 579 | * @return mixed | |
| 580 | */ | |
| 581 | public function value($value = null) | |
| 582 |     { | |
| 583 |         if (is_null($value)) { | |
| 584 | return is_null($this->value) ? $this->getDefault() : $this->value; | |
| 585 | } | |
| 586 | ||
| 587 | $this->value = $value; | |
| 588 | ||
| 589 | return $this; | |
| 590 | } | |
| 591 | ||
| 592 | /** | |
| 593 | * Set default value for field. | |