Created
May 25, 2013 23:26
-
-
Save oaltman/5651157 to your computer and use it in GitHub Desktop.
PWT
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
/** | |
* @Route("/{model}", name="model_view") | |
* @Template() | |
*/ | |
public function viewAction($model) | |
{ | |
/** @var EntityManager $entityManager */ | |
$entityManager = $this->getDoctrine()->getManager(); | |
/** @var RoomModel $model */ | |
$model = $entityManager | |
->getRepository('\Cvut\Fit\Ict\SittingOrderBundle\Entity\RoomModel') | |
->find($model); | |
$seats = (isset($model)) ? $model->getSeats() : NULL; | |
return array('seats' => $seats); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment