function ViewsThemeHooks::preprocessViewsViewField

Prepares variables for views field templates.

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

Parameters

array $variables: 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

core/modules/views/src/Hook/ViewsThemeHooks.php, line 450

Class

ViewsThemeHooks
Hook implementations for views.

Namespace

Drupal\views\Hook

Code

public function preprocessViewsViewField(array &$variables) : void {
  $variables['output'] = $variables['field']->advancedRender($variables['row']);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.