You are here

public function PISettings::buildForm in International Phone 3.x

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/PISettings.php, line 32

Class

PISettings
Form with setting for phone international.

Namespace

Drupal\phone_international\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('phone_international.settings');
  $form['cdn'] = [
    '#type' => 'checkbox',
    '#default_value' => $config
      ->get('cdn'),
    '#title' => $this
      ->t('Enable CDN Libraries'),
  ];
  return parent::buildForm($form, $form_state);
}