/**
  * index
  * manage class roster based on scheduleentity
  *
  * @Route("/admin/schedule/{id}/roster/{class}/{date}")
  * @Template("TSKScheduleBundle:Default:roster2.html.twig")
  * @Method({"GET"})
  */
 public function indexAction(ScheduleEntity $scheduleEntity, Classes $class, \DateTime $date)
 {
     // TODO:  Need to verify that scheduleEntity even exists as of $date
     // verify that scheduleEntity has a scheduleInstance on date
     $em = $this->getDoctrine()->getManager();
     $rosters = $this->getRoster($scheduleEntity, $date);
     $roster = new Roster();
     $roster->setClass($class);
     $roster->setSchedule($scheduleEntity);
     $roster->setStart($date);
     $form = $this->createForm(new RosterFormType($this->get('tsk.admin.student'), 'tsk.admin.student'), $roster);
     return array('class' => $class, 'scheduleEntity' => $scheduleEntity, 'rosters' => $rosters, 'date' => $date->format('Y-m-d'), 'form' => $form->createView());
 }