Created
September 23, 2013 20:05
-
-
Save woodworker/6676135 to your computer and use it in GitHub Desktop.
Sample of preparing and rendering
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
$this->preparer->prepare($partlet); | |
$content = $this->render($partlet); | |
if (is_array($content)) { | |
return new JsonResponse($content); | |
} else { | |
$containerClass = $partlet->getContainerPartlet(); | |
$containerWidget = $this->dic->getInstanceOfClass($containerClass); | |
$this->preparer->prepare($containerWidget, ['content' => $content]); | |
$content = $this->render($containerWidget); | |
return new Response($content); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment