function StylePluginBase::elementPreRenderRow
Same name in other branches
- 9 core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::elementPreRenderRow()
- 8.9.x core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::elementPreRenderRow()
- 11.x core/modules/views/src/Plugin/views/style/StylePluginBase.php \Drupal\views\Plugin\views\style\StylePluginBase::elementPreRenderRow()
#pre_render callback for view row field rendering.
Parameters
array $data: The element to #pre_render
Return value
array The processed element.
See also
File
-
core/
modules/ views/ src/ Plugin/ views/ style/ StylePluginBase.php, line 764
Class
- StylePluginBase
- Base class for views style plugins.
Namespace
Drupal\views\Plugin\views\styleCode
public function elementPreRenderRow(array $data) {
// Render row fields.
foreach ($this->view->field as $id => $field) {
$data[$id] = [
'#markup' => $field->theme($data['#row']),
];
}
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.