public function AddHandler::getForm in Drupal 8
Same name and namespace in other branches
- 9 core/modules/views_ui/src/Form/Ajax/AddHandler.php \Drupal\views_ui\Form\Ajax\AddHandler::getForm()
- 10 core/modules/views_ui/src/Form/Ajax/AddHandler.php \Drupal\views_ui\Form\Ajax\AddHandler::getForm()
Creates a new instance of this form.
@todo When https://www.drupal.org/node/1843224 is in, this will return \Drupal\Core\Ajax\AjaxResponse instead of the array of AJAX commands.
Parameters
\Drupal\views\ViewEntityInterface $view: The view being edited.
string|null $display_id: The display ID being edited, or NULL to load the first available display.
string $js: If this is an AJAX form, it will be the string 'ajax'. Otherwise, it will be 'nojs'. This determines the response.
Return value
array An form for a specific operation in the Views UI, or an array of AJAX commands to render a form.
Overrides ViewsFormBase::getForm
1 string reference to 'AddHandler::getForm'
- views_ui.routing.yml in core/
modules/ views_ui/ views_ui.routing.yml - core/modules/views_ui/views_ui.routing.yml
File
- core/
modules/ views_ui/ src/ Form/ Ajax/ AddHandler.php, line 34
Class
- AddHandler
- Provides a form for adding an item in the Views UI.
Namespace
Drupal\views_ui\Form\AjaxCode
public function getForm(ViewEntityInterface $view, $display_id, $js, $type = NULL) {
$this
->setType($type);
return parent::getForm($view, $display_id, $js);
}