From d88758034c5d5a0e3dd59aba73c08c9a21b0729f Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Sun, 20 Nov 2022 12:22:41 +0000
Subject: [PATCH] Issue #2689923 by pradhumanjainOSL, johnrosswvsu, WagnerMelo,
 leoneldiaz02, Anchal_gupta, sk33lz, apaderno, smustgrave, alexpott, jhodgdon:
 hook_views_pre_view incorrect documentation example

---
 core/modules/views/src/Views.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/core/modules/views/src/Views.php b/core/modules/views/src/Views.php
index 33ec07304a35..b121ed3739a4 100644
--- a/core/modules/views/src/Views.php
+++ b/core/modules/views/src/Views.php
@@ -284,12 +284,12 @@ public static function getDisabledViews() {
    * @param string $filter
    *   Filters the views on status. Can either be 'all' (default), 'enabled' or
    *   'disabled'
-   * @param mixed $exclude_view
+   * @param \Drupal\views\ViewExecutable|string $exclude_view
    *   View or current display to exclude.
    *   Either a:
-   *   - views object (containing $exclude_view->storage->name and $exclude_view->current_display)
-   *   - views name as string:  e.g. my_view
-   *   - views name and display id (separated by ':'): e.g. my_view:default
+   *   - Views executable object
+   *   - views name, for example 'my_view'
+   *   - views name and display ID separated by ':', for example 'my_view:page'
    * @param bool $optgroup
    *   If TRUE, returns an array with optgroups for each view (will be ignored for
    *   $views_only = TRUE). Can be used by select
@@ -298,7 +298,7 @@ public static function getDisabledViews() {
    *
    * @return array
    *   An associative array for use in select.
-   *   - key: view name and display id separated by ':', or the view name only.
+   *   - key: view name and display ID separated by ':', or the view name only.
    */
   public static function getViewsAsOptions($views_only = FALSE, $filter = 'all', $exclude_view = NULL, $optgroup = FALSE, $sort = FALSE) {
 
-- 
GitLab