@@ 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} |
@@ 527-536 (lines=10) @@ | ||
524 | * |
|
525 | * @return mixed |
|
526 | */ |
|
527 | public function value($value = null) |
|
528 | { |
|
529 | if (is_null($value)) { |
|
530 | return is_null($this->value) ? $this->getDefault() : $this->value; |
|
531 | } |
|
532 | ||
533 | $this->value = $value; |
|
534 | ||
535 | return $this; |
|
536 | } |
|
537 | ||
538 | /** |
|
539 | * Set default value for field. |