Exemplo n.º 1
0
 /**
  * Get the Emergency Contact's Phone Number
  */
 public function getEmergencyContactPhoneNumber()
 {
     $phone = EmergencyContactFactory::getContactsForInternship($this);
     if (!empty($phone)) {
         return $phone[0]->getPhone();
     }
 }
 /**
  * Loads the form's fields with the internship's information.
  * TODO: Use getter methods instead of just accessing Internship member variables directly.
  */
 public function plugInternship()
 {
     $this->plugStudent();
     $this->plugDept();
     $this->plugFaculty();
     $this->plugAgency();
     $this->plugInternInfo();
     $this->plugCourseInfo();
     $this->form->setMatch('experience_type', $this->intern->getExperienceType());
     $this->tpl['INTERNSHIP_JSON'] = json_encode($this->intern);
     // Plug
     $this->form->plugIn($this->formVals);
     /**
      * *
      * Emergency Contacts
      */
     //javascript('jquery');
     $contacts = EmergencyContactFactory::getContactsForInternship($this->intern);
     $emgContactJson = json_encode($contacts);
     \Layout::add(javascriptMod('intern', 'emergencyContact', array('existing_contacts_json' => $emgContactJson)));
 }