public function SettingsForm::buildForm in Default Content Deploy 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/ SettingsForm.php, line 42 - Contains \Drupal\default_content_deploy\Form\SettingsForm.
Class
- SettingsForm
- Settings form.
Namespace
Drupal\default_content_deploy\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this
->config(static::DIRECTORY);
$form['content_directory'] = [
'#type' => 'textfield',
'#title' => $this
->t('Content Directory'),
'#default_value' => $config
->get('content_directory'),
'#description' => 'Specify the path relative to index.php. For example: ../content',
];
return parent::buildForm($form, $form_state);
}