Created
April 5, 2012 07:27
-
-
Save ndusan/2308754 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
public function wraparoundAction() | |
{ | |
$response = $this->getListingResponse('wraparound'); | |
return $reponse; | |
} | |
public function dusanAction() | |
{ | |
$response = $this->getListingResponse('dusan'); | |
return $reponse; | |
} | |
public function getListingResponse($view) | |
{ | |
$response = new Response(); | |
$response->setPublic(); | |
$response->setTtl(300); | |
$form = $this->get('core.form.newsletter'); | |
$signedin = $this->get('request')->attributes->get('signedin'); | |
$cookie = $this->get('request')->cookies->get('signedin', $signedin); | |
$response = $this->render(sprintf('Newsletter:%s.html.php', $view), array( | |
'form' => $form->createView(), | |
'isAjax' => $this->get('request')->isXmlHttpRequest(), | |
'alreadySignedIn' => $cookie, | |
), $response); | |
return $response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment