public function PrevnextSettingsForm::buildForm in Prevnext 8
Same name and namespace in other branches
- 2.x src/Form/PrevnextSettingsForm.php \Drupal\prevnext\Form\PrevnextSettingsForm::buildForm()
- 2.0.x src/Form/PrevnextSettingsForm.php \Drupal\prevnext\Form\PrevnextSettingsForm::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides ConfigFormBase::buildForm
File
- src/
Form/ PrevnextSettingsForm.php, line 38 - Contains \Drupal\prevnext\Form\PrevnextSettingsForm.
Class
- PrevnextSettingsForm
- Class PrevnextSettingsForm.
Namespace
Drupal\prevnext\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config('prevnext.settings');
$form['prevnext_enabled_nodetypes'] = array(
'#title' => $this
->t('Enabled Node Types'),
'#description' => $this
->t('Check node types enabled for Previous/Next'),
'#type' => 'checkboxes',
'#options' => node_type_get_names(),
'#default_value' => $config
->get('prevnext_enabled_nodetypes'),
);
return parent::buildForm($form, $form_state);
}