You are here

public function UncacheableFieldHandlerTrait::postRender in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/field/UncacheableFieldHandlerTrait.php \Drupal\views\Plugin\views\field\UncacheableFieldHandlerTrait::postRender()

See also

\Drupal\views\Plugin\views\Field\FieldHandlerInterface::postRender()

File

core/modules/views/src/Plugin/views/field/UncacheableFieldHandlerTrait.php, line 26

Class

UncacheableFieldHandlerTrait
Trait encapsulating the logic for uncacheable field handlers.

Namespace

Drupal\views\Plugin\views\field

Code

public function postRender(ResultRow $row, $output) {
  $placeholder = $this
    ->getFieldTokenPlaceholder();
  $value = $this
    ->doRender($row);
  $this->last_render = str_replace($placeholder, $value, $output);
  return [
    $placeholder => $value,
  ];
}