You are here

public function ReportModalForm::buildForm in Forena Reports 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

src/Form/ReportModalForm.php, line 13

Class

ReportModalForm

Namespace

Drupal\forena\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $controller = AjaxPageControllerBase::service();
  $form['report'] = $this
    ->getController()->modal_content;
  $form['actions'] = [
    '#type' => 'actions',
  ];
  $form['actions']['submit'] = [
    '#type' => 'submit',
    '#value' => 'Ok',
  ];
  $this
    ->bindAjaxForm($controller, $form, $form_state);
  return $form;
}