You are here

public function FacebookPixelConfigForm::buildForm in Facebook Pixel 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/FacebookPixelConfigForm.php, line 32

Class

FacebookPixelConfigForm
Facebook Pixel config.

Namespace

Drupal\facebook_pixel\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('facebook_pixel.facebookpixelconfig');
  $form['facebook_id'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Facebook ID'),
    '#description' => $this
      ->t('Facebook ID'),
    '#maxlength' => 64,
    '#size' => 64,
    '#default_value' => $config
      ->get('facebook_id'),
  ];
  return parent::buildForm($form, $form_state);
}