/** * @inheritdoc */ public function checkboxList($items, $options = []) { if ($this->inline) { if (!isset($options['template'])) { $this->template = $this->inlineCheckboxListTemplate; } else { $this->template = $options['template']; unset($options['template']); } if (!isset($options['itemOptions'])) { $options['itemOptions'] = ['labelOptions' => ['class' => 'checkbox-inline']]; } } elseif (!isset($options['item'])) { $options['item'] = function ($index, $label, $name, $checked, $value) { return '<div class="checkbox">' . Html::checkbox($name, $checked, ['label' => $label, 'value' => $value]) . '</div>'; }; } parent::checkboxList($items, $options); return $this; }