Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UncacheableFieldHandlerTrait.php

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal