Issue #2299421 by amitgoyal, joshi.rohit100: Remove all usage of drupal_build_form() as deprecated and replaced by FormBuilderInterface::buildForm().

8.0.x
Alex Pott 2014-07-15 13:51:13 +01:00
parent 0fcb80b9a8
commit 573ad2a1d7
3 changed files with 5 additions and 4 deletions

View File

@ -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'];
}

View File

@ -48,7 +48,7 @@ interface FormBuilderInterface extends FormErrorInterface {
* @return array
* The form array.
*
* @see drupal_build_form()
* @see \Drupal\Core\Form\FormBuilderInterface::buildForm()
*/
public function getForm($form_arg);

View File

@ -10,7 +10,8 @@ use Drupal\Core\Ajax\OpenModalDialogCommand;
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: