You are here

public function StylePluginBase::elementPreRenderRow in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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

self::render()

File

core/modules/views/src/Plugin/views/style/StylePluginBase.php, line 742
Contains \Drupal\views\Plugin\views\style\StylePluginBase.

Class

StylePluginBase
Base class for views style plugins.

Namespace

Drupal\views\Plugin\views\style

Code

public function elementPreRenderRow(array $data) {

  // Render row fields.
  foreach ($this->view->field as $id => $field) {
    $data[$id] = [
      '#markup' => $field
        ->theme($data['#row']),
    ];
  }
  return $data;
}