You are here

public function LayoutForm::form in Layout builder library 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/LayoutForm.php, line 16

Class

LayoutForm
Defines a default form.

Namespace

Drupal\layout_library\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  $form = parent::form($form, $form_state);
  $form['message'] = [
    '#markup' => $this
      ->t('<a href=":url">Manage layout</a>', [
      ':url' => $this->entity
        ->toUrl('layout-builder')
        ->toString(),
    ]),
  ];
  return $form;
}