
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"
}
?>
Issue fork drupal-3466834
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:
Comments
Comment #2
jasonsafro CreditAttribution: jasonsafro commentedComment #3
jasonsafro CreditAttribution: jasonsafro commentedComment #4
prem suthar CreditAttribution: prem suthar for Drupal India Association commentedComment #5
cilefen CreditAttribution: cilefen commentedThe documentation page is for function template_preprocess_views_view_fields. You implemented function template_preprocess_views_view_field, with one “s”. Can you confirm?
Comment #7
prem suthar CreditAttribution: prem suthar for Drupal India Association commentedComment #8
quietone CreditAttribution: quietone at PreviousNext commentedThere hasn't been a reply to #5 to confirm what appears to be a typo. Given that this does appear to by a simple error I am closing this issue. If I am wrong, re-open and explain. Thanks.