public function SettingsForm::buildForm in Simple Responsive Table 8
Simple Responsive Table config form.
Parameters
array $form: Form.
\Drupal\Core\Form\FormStateInterface $form_state: Form state.
Return value
array Renderable form array.
Overrides ConfigFormBase::buildForm
File
- src/
Form/ SettingsForm.php, line 66
Class
- SettingsForm
- Class SettingsForm.
Namespace
Drupal\simple_responsive_table\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('simple_responsive_table.settings');
$form['max_width'] = [
'#type' => 'textfield',
'#title' => $this
->t('Max Width.'),
'#description' => $this
->t('Make table responsive till the screen of size in pixel.'),
'#default_value' => $config
->get('max_width'),
];
$form['enable_admin_page'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Enable for admin pages'),
'#description' => $this
->t('Make table responsive for admin pages.'),
'#default_value' => $config
->get('enable_admin_page'),
];
return parent::buildForm($form, $form_state);
}