Issue #2560447 by bojanz, longwave: Remove the undocumented, untested views_form_callback API

merge-requests/911/head
catch 2021-07-08 08:09:32 +01:00
parent cd796b6dc9
commit 3fb0eded18
2 changed files with 2 additions and 7 deletions

View File

@ -107,12 +107,7 @@ class ViewsFormMainForm implements FormInterface, TrustedCallbackInterface {
// If the field provides a views form, allow it to modify the $form array.
$has_form = FALSE;
if (property_exists($field, 'views_form_callback')) {
$callback = $field->views_form_callback;
$callback($view, $field, $form, $form_state);
$has_form = TRUE;
}
elseif (method_exists($field, 'viewsForm')) {
if (method_exists($field, 'viewsForm')) {
$field->viewsForm($form, $form_state);
$has_form = TRUE;
}

View File

@ -2451,7 +2451,7 @@ class ViewExecutable {
*/
public function hasFormElements() {
foreach ($this->field as $field) {
if (property_exists($field, 'views_form_callback') || method_exists($field, 'viewsForm')) {
if (method_exists($field, 'viewsForm')) {
return TRUE;
}
}