diff --git a/core/includes/entity.inc b/core/includes/entity.inc index 73118c6..012ef47 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -472,8 +472,6 @@ function entity_form_state_defaults(EntityInterface $entity, $operation = 'defau */ function entity_form_submit(EntityInterface $entity, $operation = 'default', &$form_state = array()) { $form_state += entity_form_state_defaults($entity, $operation); - // Add in any other arguments, removing $entity, $operation, and $form_state. - $form_state['build_info']['args'] += array_slice(func_get_args(), 3, NULL, TRUE); $form_id = entity_form_id($entity, $operation); drupal_form_submit($form_id, $form_state); } @@ -493,8 +491,6 @@ function entity_form_submit(EntityInterface $entity, $operation = 'default', &$f */ function entity_get_form(EntityInterface $entity, $operation = 'default', array $form_state = array()) { $form_state += entity_form_state_defaults($entity, $operation); - // Add in any other arguments, removing $entity, $operation, and $form_state. - $form_state['build_info']['args'] += array_slice(func_get_args(), 3, NULL, TRUE); $form_id = entity_form_id($entity, $operation); return drupal_build_form($form_id, $form_state); } diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php index 21c2772..84fd250 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php @@ -295,8 +295,8 @@ public function edit(ViewStorageInterface $view, $display_id = NULL) { } drupal_set_title($name); - $build['edit'] = entity_get_form($view_ui, 'edit', array(), $display_id); - $build['preview'] = entity_get_form($view_ui, 'preview', array(), $display_id); + $build['edit'] = entity_get_form($view_ui, 'edit', array('display_id' => $display_id)); + $build['preview'] = entity_get_form($view_ui, 'preview', array('display_id' => $display_id)); return $build; } @@ -315,7 +315,7 @@ public function edit(ViewStorageInterface $view, $display_id = NULL) { public function preview(ViewStorageInterface $view, $display_id = NULL) { $view_ui = $this->getViewUI($view); - return entity_get_form($view_ui, 'preview', array(), $display_id); + return entity_get_form($view_ui, 'preview', array('display_id' => $display_id)); } /** diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php index 6625665..772eecd 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewFormControllerBase.php @@ -27,8 +27,8 @@ /** * Overrides \Drupal\Core\Entity\EntityFormController::build(). */ - public function build(array $form, array &$form_state, EntityInterface $entity, $display_id = NULL) { - $this->displayID = $display_id; + public function build(array $form, array &$form_state, EntityInterface $entity) { + $this->displayID = $form_state['display_id']; // @todo Remove the need for this. form_load_include($form_state, 'inc', 'views_ui', 'admin');