Skip to content

Instantly share code, notes, and snippets.

@oaltman
Created May 25, 2013 23:26
Show Gist options
  • Save oaltman/5651157 to your computer and use it in GitHub Desktop.
Save oaltman/5651157 to your computer and use it in GitHub Desktop.
PWT
/**
* @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