getAdminSettingDefinition();
$this->setTitle('Paramètres');
$this->addBreadcrumb($this->getTitle());
?>
field($model, $settingDetail->getName());
if($settingDetail->getFormType() == 'checkbox') {
return $field->checkbox();
}
elseif($settingDetail->getFormType() == 'toggle') {
return $form->field($model, $settingDetail->getName(), ['options' => ['class' => 'form-group form-toggle']])->widget(Toggle::class, ['options' => ['data-on' => 'Oui', 'data-off' => 'Non', 'data-offstyle' => 'default']]);
}
elseif($settingDetail->getFormType() == 'select') {
return $field->dropDownList($settingDetail->getOptions());
}
elseif($settingDetail->getFormType() == 'textarea') {
return $field->textarea(['rows' => 4]);
}
elseif($settingDetail->getFormType() == 'input') {
return $field->textInput();
}
else {
return ' Type de champ non défini pour le paramètre "'.$settingDetail->getName().'"
';
}
}
?>