You are here

public function AdminConfig::buildForm in Facebook Instant Articles 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/AdminConfig.php, line 39
Contains Drupal\fb_instant_articles\Form\AdminConfig.

Class

AdminConfig
Class AdminConfig.

Namespace

Drupal\fb_instant_articles\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('fb_instant_articles.adminconfig');
  $form['pagesid'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('FaceBook application ID'),
    '#description' => $this
      ->t('The facebook application id is used in the drupal site, to identify the site to facebook, as participating in facebook applications.  The primary impact is the addition of a metatag to the drupal application <meta property="fb:pages" content="{application id}"/>.'),
    '#maxlength' => 64,
    '#size' => 64,
    '#default_value' => $config
      ->get('pagesid'),
  ];
  return parent::buildForm($form, $form_state);
}