| @@ 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} |
|
| @@ 554-563 (lines=10) @@ | ||
| 551 | * |
|
| 552 | * @return mixed |
|
| 553 | */ |
|
| 554 | public function value($value = null) |
|
| 555 | { |
|
| 556 | if (is_null($value)) { |
|
| 557 | return is_null($this->value) ? $this->getDefault() : $this->value; |
|
| 558 | } |
|
| 559 | ||
| 560 | $this->value = $value; |
|
| 561 | ||
| 562 | return $this; |
|
| 563 | } |
|
| 564 | ||
| 565 | /** |
|
| 566 | * Set default value for field. |
|