/** * {@inheritdoc} */ protected function extendView(FormEntityView $view) { parent::extendView($view); if ($this->getValue()) { $view->attributes['checked'] = 'checked'; } $view->attributes['value'] = 1; }
/** * {@inheritdoc} */ protected function extendView(FormEntityView $view) { parent::extendView($view); unset($view->attributes['value']); }