You are here

public function BookAdminEditForm::buildForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/book/src/Form/BookAdminEditForm.php \Drupal\book\Form\BookAdminEditForm::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

core/modules/book/src/Form/BookAdminEditForm.php, line 74
Contains \Drupal\book\Form\BookAdminEditForm.

Class

BookAdminEditForm
Provides a form for administering a single book's hierarchy.

Namespace

Drupal\book\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, NodeInterface $node = NULL) {
  $form['#title'] = $node
    ->label();
  $form['#node'] = $node;
  $this
    ->bookAdminTable($node, $form);
  $form['save'] = array(
    '#type' => 'submit',
    '#value' => $this
      ->t('Save book pages'),
  );
  return $form;
}