Inaccurate documentation

Created on 8 August 2024, about 2 months ago

API page: https://api.drupal.org/api/drupal/core%21modules%21views%21views.theme.i...

Documentation says $variables is an array with 3 elements.

<?php
function my_theme_preprocess_views_view_field(&$variables) {
  var_dump(array_keys($variables));
  die;
}
?>

gives me an array with 22 elements

<?php
array(22) {
  [0]=>
  string(4) "view"
  [1]=>
  string(5) "field"
  [2]=>
  string(3) "row"
  [3]=>
  string(7) "context"
  [4]=>
  string(4) "icon"
  [5]=>
  string(13) "icon_position"
  [6]=>
  string(9) "icon_only"
  [7]=>
  string(19) "theme_hook_original"
  [8]=>
  string(10) "attributes"
  [9]=>
  string(16) "title_attributes"
  [10]=>
  string(18) "content_attributes"
  [11]=>
  string(12) "title_prefix"
  [12]=>
  string(12) "title_suffix"
  [13]=>
  string(12) "db_is_active"
  [14]=>
  string(8) "is_admin"
  [15]=>
  string(9) "logged_in"
  [16]=>
  string(4) "user"
  [17]=>
  string(9) "directory"
  [18]=>
  string(6) "output"
  [19]=>
  string(8) "is_front"
  [20]=>
  string(6) "#cache"
  [21]=>
  string(5) "theme"
}
?>
šŸ“Œ Task
Status

Postponed: needs info

Version

10.2 āœØ

Component
DocumentationĀ  ā†’

Last updated 8 minutes ago

No maintainer
Created by

šŸ‡ŗšŸ‡øUnited States JasonSafro

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024