function _views_ui_wrap_views_form_helper_traits

Same name and namespace in other branches
  1. main core/modules/views_ui/admin.inc \_views_ui_wrap_views_form_helper_traits()

Provides a BC layer for procedural deprecated function.

Return value

object A minimal class that only uses ViewsFormAjaxHelperTrait and ViewsFormHelperTrait traits and wraps the protected methods to make them accessible for the deprecated functions.

Deprecated

in drupal:11.4.0 and is removed from drupal:13.0.0. There is no replacement.

See also

https://www.drupal.org/node/3040111

File

core/modules/views_ui/admin.inc, line 196

Code

function _views_ui_wrap_views_form_helper_traits() : object {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. There is no replacement. See https://www.drupal.org/node/3040111', E_USER_DEPRECATED);
  return new class  {
    use ViewsFormAjaxHelperTrait;
    use ViewsFormHelperTrait;
    public function addAjaxTriggerWrapper(array &$wrapping_element, $trigger_key, array $refresh_parents) : void {
      $this->addAjaxTrigger($wrapping_element, $trigger_key, $refresh_parents);
    }
    public function standardDisplayDropdownWrapper(array &$form, FormStateInterface $formState, string $section) : void {
      $this->standardDisplayDropdown($form, $formState, $section);
    }
    public function buildFormUrlWrapper(FormStateInterface $formState) : Url {
      return $this->buildFormUrl($formState);
    }

};
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.