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