Created
August 3, 2011 08:59
-
-
Save skurfuerst/1122210 to your computer and use it in GitHub Desktop.
This file contains 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 | |
public function harvest() { | |
// taken from AbstractTemplateView::render | |
$this->baseRenderingContext->setControllerContext($this->controllerContext); | |
$this->templateParser->setConfiguration($this->buildParserConfiguration()); | |
$templateIdentifier = $this->getTemplateIdentifier(NULL); | |
if ($this->templateCompiler->has($templateIdentifier)) { | |
$parsedTemplate = $this->templateCompiler->get($templateIdentifier); | |
} else { | |
$parsedTemplate = $this->templateParser->parse($this->getTemplateSource($actionName)); | |
if ($parsedTemplate->isCompilable()) { | |
$this->templateCompiler->store($templateIdentifier, $parsedTemplate); | |
} | |
} | |
// Now custom code | |
$this->startRendering(self::RENDERING_TEMPLATE, $parsedTemplate, $this->baseRenderingContext); | |
$this->renderSection('Configuration'); | |
$vhVarContainer = $this->baseRenderingContext->getViewHelperVariableContainer(); | |
// do stuff with vh var container now | |
$this->stopRendering(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment