*/ protected array $attributes = [ 'id' => '', 'name' => '', 'value' => '', 'class' => '', ]; protected string $label = ''; protected string $hint = ''; protected bool $checked = false; public function render(): string { $wrapperClass = $this->attributes['class']; unset($this->attributes['class']); $this->attributes['class'] = 'form-switch'; $checkbox = form_checkbox($this->attributes, $this->attributes['value'], $this->checked); $hint = $this->hint !== '' ? hint_tooltip(lang('Podcast.form.lock_hint'), 'ml-1') : ''; return << {$checkbox} {$this->label}{$hint} CODE_SAMPLE; } }