Commit 573ad2a1 authored by alexpott's avatar alexpott

Issue #2299421 by amitgoyal, joshi.rohit100: Remove all usage of...

Issue #2299421 by amitgoyal, joshi.rohit100: Remove all usage of drupal_build_form() as deprecated and replaced by FormBuilderInterface::buildForm().
parent 0fcb80b9
......@@ -453,7 +453,7 @@ function _batch_finished() {
// If no redirection happened, redirect to the originating page. In case the
// form needs to be rebuilt, save the final $form_state for
// drupal_build_form().
// \Drupal\Core\Form\FormBuilderInterface::buildForm().
if (!empty($_batch['form_state']['rebuild'])) {
$_SESSION['batch_form_state'] = $_batch['form_state'];
}
......
......@@ -48,7 +48,7 @@ public function getFormId($form_arg, &$form_state);
* @return array
* The form array.
*
* @see drupal_build_form()
* @see \Drupal\Core\Form\FormBuilderInterface::buildForm()
*/
public function getForm($form_arg);
......
......@@ -10,7 +10,8 @@
use Drupal\Core\Ajax\AjaxResponse;
/**
* Wrapper around drupal_build_form to handle some AJAX stuff automatically.
* Wrapper around \Drupal\Core\Form\FormBuilderInterface::buildForm() to handle
* some AJAX stuff automatically.
* This makes some assumptions about the client.
*/
function views_ajax_form_wrapper($form_id, &$form_state) {
......@@ -24,7 +25,7 @@ function views_ajax_form_wrapper($form_id, &$form_state) {
),
);
$form = drupal_build_form($form_id, $form_state);
$form = \Drupal::formBuilder()->buildForm($form_id, $form_state);
$output = drupal_render($form);
// These forms have the title built in, so set the title here:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment