public function ViewsTestDataElementForm::buildForm

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form.

Return value

array The form structure.

Overrides FormInterface::buildForm

File

drupal/core/modules/views/tests/views_test_data/lib/Drupal/views_test_data/Form/ViewsTestDataElementForm.php, line 26
Contains \Drupal\views_test_data\Form\ViewsTestDataElementForm.

Class

ViewsTestDataElementForm
Simple form page callback to test the view element.

Namespace

Drupal\views_test_data\Form

Code

public function buildForm(array $form, array &$form_state) {
  $form['view'] = array(
    '#type' => 'view',
    '#name' => 'test_view',
    '#display_id' => 'default',
    '#arguments' => array(
      25,
    ),
  );
  return $form;
}