/**
  * The main instructor page for an event.
  *
  */
 public function indexAction()
 {
     $get = Zend_Registry::get('getFilter');
     if (!isset($get->eventId)) {
         throw new Ot_Exception_Input('msg-error-eventIdNotSet');
     }
     // lookup the event
     $event = new Event();
     $thisEvent = $event->find($get->eventId);
     if (is_null($thisEvent)) {
         throw new Ot_Exception_Data('msg-error-noEvent');
     }
     $this->view->event = $thisEvent->toArray();
     // lookup the instructors
     $instructor = new Event_Instructor();
     $instructors = $instructor->getInstructorsForEvent($thisEvent->eventId);
     $instructorList = array();
     foreach ($instructors as $i) {
         $instructorList[] = $i['firstName'] . ' ' . $i['lastName'];
     }
     $this->view->instructors = $instructorList;
     $this->_checkValidViewer($instructors);
     // lookup the location of the event
     $location = new Location();
     $thisLocation = $location->find($thisEvent->locationId);
     if (is_null($thisLocation)) {
         throw new Ot_Exception_Data('msg-error-noLocation');
     }
     $this->view->location = $thisLocation->toArray();
     // lookup the corresponding workshop
     $workshop = new Workshop();
     $thisWorkshop = $workshop->find($thisEvent->workshopId);
     if (is_null($thisWorkshop)) {
         throw new Ot_Exception_Data('msg-error-noWorkshop');
     }
     $this->view->workshop = $thisWorkshop->toArray();
     // lookup the attendees of the event
     $attendee = new Event_Attendee();
     $attendeeList = $attendee->getAttendeesForEvent($thisEvent->eventId, 'attending');
     $this->view->attendeeList = $attendeeList;
     $waitlist = $attendee->getAttendeesForEvent($thisEvent->eventId, 'waitlist');
     $this->view->waitlist = $waitlist;
     $this->view->acl = array('addAttendee' => $this->_helper->hasAccess('add-attendee'), 'takeRoll' => $this->_helper->hasAccess('take-roll'), 'editEvent' => $this->_helper->hasAccess('edit-event', 'workshop_schedule'), 'deleteAttendee' => $this->_helper->hasAccess('delete-attendee'), 'promoteAttendee' => $this->_helper->hasAccess('promote-attendee'), 'printSignupSheet' => $this->_helper->hasAccess('print-signup-sheet'), 'contact' => $this->_helper->hasAccess('contact'));
     $this->view->isEditable = $event->isEditable($thisEvent->eventId);
     $this->view->messages = $this->_helper->flashMessenger->getMessages();
 }