You are here

public function OAuthDeleteConsumerForm::buildForm in OAuth 1.0 8.2

Same name and namespace in other branches
  1. 8 src/Form/OAuthDeleteConsumerForm.php \Drupal\oauth\Form\OAuthDeleteConsumerForm::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

src/Form/OAuthDeleteConsumerForm.php, line 125
Contains \Drupal\oauth\Form\OAuthDeleteConsumerForm.

Class

OAuthDeleteConsumerForm
Provides an oauth_consumer deletion confirmation form.

Namespace

Drupal\oauth\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, AccountInterface $user = NULL, $key = NULL) {
  $form['key'] = array(
    '#type' => 'hidden',
    '#value' => $key,
  );
  $form['uid'] = array(
    '#type' => 'hidden',
    '#value' => $user
      ->id(),
  );
  $form = parent::buildForm($form, $form_state);
  return $form;
}