*/ protected $options; /** * @param mixed[]|\Closure $options */ public function options($options): self { $this->options = $options instanceof Closure ? $options() : $options; return $this; } public function getValueType(): string { return 'array'; } public function getValueSanitizer(): callable { return function ($value) { if (! is_array($value)) $value = [$value]; return array_filter($value, function ($item) { return array_key_exists($item, $this->options); }); }; } public function render(): void { $currentValue = Setting::array($this->getKey()); ?>