public function FacebookCommentsSettingsForm::buildForm in Facebook Comments Social Plugin 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/ FacebookCommentsSettingsForm.php, line 36 - Contains \Drupal\facebook_comments\Form\FacebookCommentsSettingsForm
Class
Namespace
Drupal\facebook_comments\FormCode
public function buildForm(array $form, FormStateInterface $form_state, Request $request = NULL) {
$config = \Drupal::config('facebook_comments.settings');
$form['facebook_comments_appid'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Facebook App ID'),
'#default_value' => $config
->get('facebook_comments_appid'),
'#description' => $this
->t('Enter the Facebook App ID to ensure that all comments can be grouped for moderation.'),
);
$form['facebook_comments_admins'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Facebook Admins'),
'#default_value' => $config
->get('facebook_comments_admins'),
'#description' => $this
->t('Enter a comma-seperated list of all Facebook admin user id\'s to ensure that all comments can be grouped for moderation.<br/>If you enter an App ID, the Admins will be ignored. For more information read the <a href=":url">developer documentation</a>.', array(
':url' => 'https://developers.facebook.com/docs/plugins/comments#moderation-setup-instructions',
)),
);
$form['facebook_comments_ssl'] = array(
'#type' => 'checkbox',
'#title' => $this
->t('SSL support'),
'#default_value' => $config
->get('facebook_comments_ssl'),
'#description' => $this
->t('Enable support for SSL. Warning: you might lose comments on existing pages.'),
);
return parent::buildForm($form, $form_state);
}