You are here

public function InlineEntityFormTest::buildForm in Workbench Access 8

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

tests/src/Kernel/InlineEntityFormTest.php, line 93

Class

InlineEntityFormTest
Tests workbench access with inline entity form.

Namespace

Drupal\Tests\workbench_access\Kernel

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['inline_entity_form'] = [
    '#type' => 'inline_entity_form',
    '#entity_type' => 'node',
    '#bundle' => 'page',
  ];
  $form['submit'] = [
    '#type' => 'submit',
    '#value' => t('Submit'),
  ];
  return $form;
}