You are here

public function WorkspaceConfigForm::buildForm in Workspace 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/WorkspaceConfigForm.php, line 70

Class

WorkspaceConfigForm
Class WorkspaceConfigForm.

Namespace

Drupal\workspace\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config_settings = $this
    ->config('workspace.settings');
  $form['default'] = [
    '#type' => 'fieldset',
    '#title' => $this
      ->t('Default settings'),
  ];
  $form['default']['description'] = [
    '#type' => 'markup',
    '#markup' => $this
      ->t('Settings that will be used as default when creating new workspaces.'),
  ];
  $this
    ->addDefaultTargetWorkspaceSettingField($form, $config_settings);
  $this
    ->addFilterSettingsFields($form, $config_settings);
  return parent::buildForm($form, $form_state);
}