src/Company/BaseBundle/Controller/DefaultController.php
author cavaliet
Mon, 07 Jul 2014 17:23:47 +0200
changeset 122 d672f7dd74dc
parent 4 02eab39cf8c6
permissions -rwxr-xr-x
Added tag V00.17 for changeset ada5f3d8b5b4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
namespace Company\BaseBundle\Controller;
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
class DefaultController extends Controller
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
{
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
    
4
02eab39cf8c6 add user in headers
ymh <ymh.work@gmail.com>
parents: 2
diff changeset
    11
    public function indexAction()
2
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
    {
4
02eab39cf8c6 add user in headers
ymh <ymh.work@gmail.com>
parents: 2
diff changeset
    13
    	$user = $this->get('security.context')->getToken()->getUser();
02eab39cf8c6 add user in headers
ymh <ymh.work@gmail.com>
parents: 2
diff changeset
    14
        return $this->render('CompanyBaseBundle:Default:index.html.twig', array('user'=>$user));
2
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    }
806e57d67020 Base Bundle commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
}