DirectRenderStrategy.php in Render cache 7.2
File
src/RenderCache/RenderStrategy/DirectRenderStrategy.php
View source
<?php
namespace Drupal\render_cache\RenderCache\RenderStrategy;
class DirectRenderStrategy extends BaseRenderStrategy {
public function render(array $args) {
$placeholders = array();
foreach ($args as $placeholder => $ph_object) {
$rcc = render_cache_get_controller($ph_object['type']);
$rcc
->setContext($ph_object['context']);
$objects = array(
$ph_object['id'] => $ph_object['object'],
);
$build = $rcc
->viewPlaceholders($objects);
$placeholders[$placeholder] = $build;
}
return $placeholders;
}
}