public function SocialLinkFieldSettingsForm::buildForm in Social Link Field 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/ SocialLinkFieldSettingsForm.php, line 18
Class
- SocialLinkFieldSettingsForm
- Implements the SocialLinkFieldSettings form controller.
Namespace
Drupal\social_link_field\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$config = $this->configFactory
->get('social_link_field.settings');
$form['attached_fa'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Attach external FontAwesome library'),
'#default_value' => $config
->get('attached_fa'),
'#description' => $this
->t('If you attached FontAwesome in your theme, please switch off this checkbox.'),
];
return parent::buildForm($form, $form_state);
}