Created
June 20, 2013 15:21
-
-
Save EclipseGc/5823702 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
protected function renderBlocks(Request $request, BoundDisplayInterface $display) { | |
$blockFragments = array(); | |
foreach ($display->getAllOuterBlockConfig() as $id => $config) { | |
$block = $display->getBlock($id); | |
if ($block instanceof SystemMainBlock) { | |
$block->setControllerClosure($request->attributes->get('_content_closure')); | |
} | |
$block_config = $block->getConfig(); | |
foreach ($block_config['context'] as $local => $parent) { | |
$block->setContextValue($local, $display->getContextValue($parent)); | |
} | |
$munged_request = clone $request; | |
// @todo muck with the Request here to get it to where we need | |
$blockFragments[$id] = $this->renderingStrategies[$config['strategy']]->render($block, $munged_request); | |
} | |
return $blockFragments; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment