You are here

public function FormModeManagerRolesForm::buildForm in Form mode manager 8.2

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 FormModeManagerFormBase::buildForm

File

modules/form_mode_user_roles_assign/src/Form/FormModeManagerRolesForm.php, line 56

Class

FormModeManagerRolesForm
Configure Form for Form Mode Manager Role Assign settings.

Namespace

Drupal\form_mode_user_roles_assign\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form = parent::buildForm($form, $form_state);
  if (isset($form['empty'])) {
    return $form;
  }
  $form['user_assign_form_mode_settings'] = [
    '#type' => 'details',
    '#title' => $this
      ->t('Automatic Role assign per form mode'),
    '#open' => TRUE,
  ];
  $form['user_assign_form_mode_settings']['vertical_tabs_per_modes'] = [
    '#type' => 'vertical_tabs',
  ];
  $this
    ->buildFormModeForm($form);
  return $form;
}