* @return string|null
* The rendered exposed form as string or NULL otherwise.

https://git.drupalcode.org/project/drupal/-/blob/9.2.4/core/modules/view...

In fact, the viewExposedFormBlocks() method returns array|null.

Issue fork drupal-3230690

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chi created an issue. See original summary.

Chi’s picture

Title: Incorect documentation in Drupal\views\Plugin\views\display::viewExposedFormBlocks)() » Incorrect documentation in Drupal\views\Plugin\views\display::viewExposedFormBlocks)()

Ideally, it should return empty array instead of null, but that's another issue.

Chi’s picture

Anul made their first commit to this issue’s fork.

Anul’s picture

Hi Ivan,

Raised a PR for the this issue. Updated the documentation.
https://git.drupalcode.org/project/drupal/-/merge_requests/1168/diffs

Thanks
Anul

Anul’s picture

Status: Active » Needs review
Chi’s picture

The rendered exposed form as array or NULL otherwise.

That sounds wrong because the form is not actually rendered.
It could be something like follows.

The renderable exposed form as array or null otherwise.

Anul’s picture

I agree on the point Ivan. Updated the comment as suggested.

Chi’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

larowlan’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 1eae8e8 and pushed to 9.3.x. Thanks!

As there is little risk of disruption here, backported to 9.2.x

  • larowlan committed 58bade9 on 9.2.x
    Issue #3230690 by Anul: Incorrect documentation in Drupal\views\Plugin\...
  • larowlan committed 1eae8e8 on 9.3.x
    Issue #3230690 by Anul: Incorrect documentation in Drupal\views\Plugin\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.