public function AutocompleteSettingsForm::buildForm in Multi-path autocomplete 8
Implements \Drupal\Core\Form\FormInterface::buildForm().
Overrides ConfigFormBase::buildForm
File
- lib/
Drupal/ mpac/ AutocompleteSettingsForm.php, line 62 - Contains \Drupal\mpac\AutocompleteSettingsForm.
Class
- AutocompleteSettingsForm
- Configure user settings for this site.
Namespace
Drupal\mpacCode
public function buildForm(array $form, array &$form_state) {
$config = $this->configFactory
->get('mpac.autocomplete');
$form['mpac_max_items'] = array(
'#type' => 'select',
'#title' => t('Maximum number of items'),
'#description' => t('Select the maximum number of items in an autocomplete list provided by %mpac.', array(
'%mpac' => 'Multi-path autocomplete',
)),
'#default_value' => $config
->get('items.max'),
'#options' => drupal_map_assoc(array(
10,
20,
50,
100,
)),
);
return parent::buildForm($form, $form_state);
}