You are here

public function UncacheableFieldHandlerTrait::postRender in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 31
Contains \Drupal\views\Plugin\views\field\UncacheableFieldHandlerTrait.

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,
  ];
}