You are here

public function AuthorizationProfileForm::form in Authorization 8

Gets the actual form array to be built.

Overrides EntityForm::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

File

src/Form/AuthorizationProfileForm.php, line 123

Class

AuthorizationProfileForm
Authorization profile form.

Namespace

Drupal\authorization\Form

Code

public function form(array $form, FormStateInterface $form_state) : array {
  $form = parent::form($form, $form_state);
  $this
    ->buildEntityForm($form, $form_state);

  // Skip adding the plugin config forms if we cleared the server form due to
  // an error.
  if ($form) {
    $this
      ->buildProviderConfigForm($form, $form_state);
    $this
      ->buildConsumerConfigForm($form, $form_state);
    $this
      ->buildConditionsForm($form, $form_state);
    $this
      ->buildMappingForm($form, $form_state);
    $form['#prefix'] = "<div id='authorization-profile-form'>";
    $form['#suffix'] = "</div>";
  }
  return $form;
}