public function OAuthAddConsumerForm::buildForm in OAuth 1.0 8.2
Same name and namespace in other branches
- 8 src/Form/OAuthAddConsumerForm.php \Drupal\oauth\Form\OAuthAddConsumerForm::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 FormInterface::buildForm
File
- src/
Form/ OAuthAddConsumerForm.php, line 74 - Contains \Drupal\oauth\Form\OAuthAddConsumerForm.
Class
- OAuthAddConsumerForm
- Provides a form to add OAuth consumers.
Namespace
Drupal\oauth\FormCode
public function buildForm(array $form, FormStateInterface $form_state, AccountInterface $user = NULL) {
$form['save'] = array(
'#type' => 'submit',
'#value' => $this
->t('Add'),
);
$form['uid'] = array(
'#type' => 'hidden',
'#value' => $user
->id(),
);
return $form;
}