| @@ 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 = (array) $value; |
|
| 69 | ||
| 70 | return $this; |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * {@inheritdoc} |
|
| @@ 500-509 (lines=10) @@ | ||
| 497 | * |
|
| 498 | * @return mixed |
|
| 499 | */ |
|
| 500 | public function value($value = null) |
|
| 501 | { |
|
| 502 | if (is_null($value)) { |
|
| 503 | return is_null($this->value) ? $this->getDefault() : $this->value; |
|
| 504 | } |
|
| 505 | ||
| 506 | $this->value = $value; |
|
| 507 | ||
| 508 | return $this; |
|
| 509 | } |
|
| 510 | ||
| 511 | /** |
|
| 512 | * Set default value for field. |
|