You are here

public function AuthcacheBlockFragment::render in Authenticated User Page Caching (Authcache) 7.2

Render and return fragment.

Parameters

string $key: The key for the fragment to be rendered.

var $subject: The result of the loader function for the given key. If no AuthcacheP13nFragmentLoader is associated with this fragment, subject is equal to key.

array $context: Additional run-time per-request context (key-value pairs).

Return value

string Return a string representing the HTML fragment

Overrides AuthcacheP13nFragmentInterface::render

File

modules/authcache_block/includes/AuthcacheBlockFragment.inc, line 44
Defines fragment for blocks.

Class

AuthcacheBlockFragment
Fragment handler for blocks.

Code

public function render($block_id, $block, $context) {
  $build = _block_get_renderable_array(_block_render_blocks(array(
    $block_id => $block,
  )));
  return render($build);
}