You are here

public function SocialGroupSettings::buildForm in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  2. 8.2 modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  3. 8.3 modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  4. 8.4 modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  5. 8.5 modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  6. 8.6 modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  7. 8.7 modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  8. 8.8 modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  9. 10.3.x modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  10. 10.0.x modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  11. 10.1.x modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::buildForm()
  12. 10.2.x modules/social_features/social_group/src/Form/SocialGroupSettings.php \Drupal\social_group\Form\SocialGroupSettings::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 ConfigFormBase::buildForm

File

modules/social_features/social_group/src/Form/SocialGroupSettings.php, line 34

Class

SocialGroupSettings
Class SocialGroupSettings.

Namespace

Drupal\social_group\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $config = $this
    ->config('social_group.settings');
  $form['allow_group_selection_in_node'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Allow logged-in users to change or remove a group when editing content'),
    '#description' => $this
      ->t('When checked, logged-in users can also move content to or out of a group after the content is created. Users can only move content to a group the author is a member of.'),
    '#default_value' => $config
      ->get('allow_group_selection_in_node'),
  ];
  return parent::buildForm($form, $form_state);
}