public function BlockUploadSettingsForm::buildForm in Block Upload 8
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/ BlockUploadSettingsForm.php, line 30
Class
- BlockUploadSettingsForm
- Module configuration form.
Namespace
Drupal\block_upload\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['block_upload_blocks_count'] = [
'#type' => 'select',
'#title' => $this
->t('Blocks count'),
'#options' => array_combine(range(1, 10), range(1, 10)),
'#default_value' => $this
->config('block_upload.settings')
->get('blocks_count'),
];
return parent::buildForm($form, $form_state);
}