You are here

protected function InsertViewDialog::getClientValues in Advanced Insert View 8

Same name and namespace in other branches
  1. 2.0.x src/Form/InsertViewDialog.php \Drupal\insert_view_adv\Form\InsertViewDialog::getClientValues()

Get the values from the form required for the client.

Parameters

\Drupal\Core\Form\FormStateInterface $form_state: The form state from the dialog submission.

Return value

array An array of values sent to the client for use in the WYSIWYG.

1 call to InsertViewDialog::getClientValues()
InsertViewDialog::ajaxSubmit in src/Form/InsertViewDialog.php
An AJAX submit callback to validate the WYSIWYG modal.

File

src/Form/InsertViewDialog.php, line 350

Class

InsertViewDialog
Class InsertViewDialog

Namespace

Drupal\insert_view_adv\Form

Code

protected function getClientValues(FormStateInterface $form_state) {
  $view = $form_state
    ->getValue('inserted_view_adv');
  $arguments = $form_state
    ->getValue('argument');
  return [
    'inserted_view_adv' => $view,
    'arguments' => array_filter($arguments),
  ];
}