Created
January 25, 2014 02:28
-
-
Save oscargicast/8610878 to your computer and use it in GitHub Desktop.
Controller
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 | |
namespace Hackspace\PaginasBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
class DefaultController extends Controller | |
{ | |
public function indexAction($name) | |
{ | |
return $this->render('HackspacePaginasBundle:Default:index.html.twig', array('name' => $name)); | |
} | |
public function bienvenidaAction() | |
{ | |
$ubicacion = "Lima-Peru"; | |
return $this->render( | |
'HackspacePaginasBundle:Default:bienvenida.html.twig', | |
array( | |
'ubicacion' => $ubicacion | |
) | |
); | |
} | |
public function operacionControllerAction($variable1, $variable2) | |
{ | |
$result = $variable1 + $variable2; | |
return $this->render( | |
'HackspacePaginasBundle:Default:operacion.html.twig', | |
array( | |
'result' => $result, | |
'variable1' => $variable1, | |
'variable2' => $variable2, | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment