public function ViewExecutable::renderField in Views (for Drupal 7) 8.3
Render a specific field via the field ID and the row #
Note: You might want to use views_plugin_style::render_fields as it caches the output for you.
Parameters
string $field: The id of the field to be rendered.
int $row: The row number in the $view->result which is used for the rendering.
Return value
string The rendered output of the field.
File
- lib/
Drupal/ views/ ViewExecutable.php, line 1358 - Definition of Drupal\views\ViewExecutable.
Class
- ViewExecutable
- An object to contain all of the data to generate a view, plus the member functions to build the view query, execute the query and render the output.
Namespace
Drupal\viewsCode
public function renderField($field, $row) {
if (isset($this->field[$field]) && isset($this->result[$row])) {
return $this->field[$field]
->advanced_render($this->result[$row]);
}
}