Skip to content

Instantly share code, notes, and snippets.

@oscargicast
Created January 25, 2014 02:28
Show Gist options
  • Save oscargicast/8610878 to your computer and use it in GitHub Desktop.
Save oscargicast/8610878 to your computer and use it in GitHub Desktop.
Controller
<?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