$this->view->row_index = 0;
$field_ids =
array_keys($this->view->field
);
// Only tokens relating to field handlers preceding the one we invoke
// ::getRenderTokens() on are returned, so here we need to pick the last
// available field handler.
$render_tokens_field_id =
end($field_ids);
// If all fields have a field::access FALSE there might be no fields, so
// there is no reason to execute this code.
if (!
empty($field_ids)) { $renderer =
$this->
getRenderer();
/** @var \Drupal\views\Plugin\views\cache\CachePluginBase $cache_plugin */
$cache_plugin =
$this->view->display_handler->
getPlugin('cache'
);
$max_age =
$cache_plugin->
getCacheMaxAge();
/** @var \Drupal\views\ResultRow $row */
foreach ($result as $index =>
$row) { $this->view->row_index =
$index;
// Here we implement render caching for result rows. Since we never
// build a render array for single rows, given that style templates
// need individual field markup to support proper theming, we build