public function AuthLoginNoticeForm::buildForm in Open Social 8.8
Same name and namespace in other branches
- 8.9 modules/custom/social_auth_extra/src/Form/AuthLoginNoticeForm.php \Drupal\social_auth_extra\Form\AuthLoginNoticeForm::buildForm()
- 8 modules/custom/social_auth_extra/src/Form/AuthLoginNoticeForm.php \Drupal\social_auth_extra\Form\AuthLoginNoticeForm::buildForm()
- 8.2 modules/custom/social_auth_extra/src/Form/AuthLoginNoticeForm.php \Drupal\social_auth_extra\Form\AuthLoginNoticeForm::buildForm()
- 8.3 modules/custom/social_auth_extra/src/Form/AuthLoginNoticeForm.php \Drupal\social_auth_extra\Form\AuthLoginNoticeForm::buildForm()
- 8.4 modules/custom/social_auth_extra/src/Form/AuthLoginNoticeForm.php \Drupal\social_auth_extra\Form\AuthLoginNoticeForm::buildForm()
- 8.5 modules/custom/social_auth_extra/src/Form/AuthLoginNoticeForm.php \Drupal\social_auth_extra\Form\AuthLoginNoticeForm::buildForm()
- 8.6 modules/custom/social_auth_extra/src/Form/AuthLoginNoticeForm.php \Drupal\social_auth_extra\Form\AuthLoginNoticeForm::buildForm()
- 8.7 modules/custom/social_auth_extra/src/Form/AuthLoginNoticeForm.php \Drupal\social_auth_extra\Form\AuthLoginNoticeForm::buildForm()
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 ConfirmFormBase::buildForm
File
- modules/
custom/ social_auth_extra/ src/ Form/ AuthLoginNoticeForm.php, line 70
Class
- AuthLoginNoticeForm
- Class AuthLoginNoticeForm.
Namespace
Drupal\social_auth_extra\FormCode
public function buildForm(array $form, FormStateInterface $form_state, $network = NULL) {
$network_manager = \Drupal::service('plugin.network.manager');
$definitions = $network_manager
->getDefinitions();
foreach ($definitions as $definition) {
$instance = $network_manager
->createInstance($definition['id']);
if ($network == $instance
->getSocialNetworkKey()) {
$this->socialNetwork = $definition;
break;
}
}
return parent::buildForm($form, $form_state);
}