function template_preprocess_views_view_field

Prepares variables for views field templates.

Default template: views-view-field.html.twig.

Parameters

array $vars: An associative array containing:

  • field: The field handler object for the current field.
  • row: Object representing the raw result of the SQL query for the current field.
  • view: Instance of the ViewExecutable object for the parent view.

File

drupal/core/modules/views/views.theme.inc, line 398
Preprocessors and helper functions to make theming easier.

Code

function template_preprocess_views_view_field(&$vars) {
  $vars['output'] = $vars['field']
    ->advancedRender($vars['row']);
}