You are here

public function JanrainScreensSettingsForm::buildForm in Janrain Registration 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/JanrainScreensSettingsForm.php, line 30

Class

JanrainScreensSettingsForm
Janrain Screens settings form.

Namespace

Drupal\janrain_capture\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($form, $form_state);
  $config = $this
    ->config('janrain_capture.settings');
  $form['screens_folder'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Screens Folder'),
    '#description' => $this
      ->t('URL of the Capture screens folder<br/>(examples: file:///sites/all/themes/janrain-capture-screens/, http://example.com/capture-screens/)'),
    '#default_value' => $config
      ->get('screens.folder'),
  ];
  return $form;
}