You are here

function varbase_auth_build_formbit in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.5

Same name and namespace in other branches
  1. 8.8 src/FormBit/varbase_auth.formbit.php \varbase_auth_build_formbit()
  2. 8.4 src/FormBit/varbase_auth.formbit.php \varbase_auth_build_formbit()
  3. 8.6 src/FormBit/varbase_auth.formbit.php \varbase_auth_build_formbit()
  4. 8.7 src/FormBit/varbase_auth.formbit.php \varbase_auth_build_formbit()
  5. 9.0.x src/FormBit/varbase_auth.formbit.php \varbase_auth_build_formbit()

Build form bit.

Parameters

array $formbit: FormBit for the form.

Drupal\Core\Form\FormStateInterface $form_state: Form status.

array $install_state: Install state.

File

src/FormBit/varbase_auth.formbit.php, line 36
FormBit file for varbase_auth feature mdoule.

Code

function varbase_auth_build_formbit(array &$formbit, FormStateInterface &$form_state, array &$install_state = NULL) {
  $formbit['social_auth_type'] = [
    '#type' => 'checkboxes',
    '#title' => t('Social authentications to enable'),
    '#default_value' => [
      'social_auth_google',
    ],
    '#options' => [
      'social_auth_google' => t('Google +'),
      'social_auth_facebook' => t('Facebook'),
      'social_auth_linkedin' => t('Linkedin'),
      'social_auth_twitter' => t('Twitter'),
    ],
  ];
}