You are here

protected function BlockController::getCacheContext in Render cache 7.2

Parameters

object $object:

array $context:

Return value

array

Overrides BaseController::getCacheContext

File

modules/controller/render_cache_block/src/RenderCache/Controller/BlockController.php, line 30
Contains \Drupal\render_cache_block\RenderCache\Controller\BlockController

Class

BlockController
BlockController - Provides render caching for block objects.

Namespace

Drupal\render_cache_block\RenderCache\Controller

Code

protected function getCacheContext($object, array $context) {

  // Helper variables.
  $block = $object;
  $context = parent::getCacheContext($object, $context);
  $context = $context + array(
    'bid' => $block->bid,
    'delta' => $block->delta,
    'module' => $block->module,
  );
  return $context;
}