updateDefaultsFromObject() protected method

Updates the default values of the form with the current values of the current object.
protected updateDefaultsFromObject ( )
 public function updateDefaultsFromObject()
 {
     parent::updateDefaultsFromObject();
     if (isset($this->widgetSchema['option_career_subject_list'])) {
         $values = array();
         foreach ($this->object->getChoices() as $option_career_subject) {
             $values[] = $option_career_subject->getChoiceCareerSubjectSchoolYearId();
         }
         $this->setDefault('option_career_subject_list', $values);
     }
 }
 public function updateDefaultsFromObject()
 {
     parent::updateDefaultsFromObject();
     if (isset($this->widgetSchema['examination_subject_student_list'])) {
         $values = array();
         foreach ($this->object->getStudents() as $student) {
             $values[] = $student->getId();
         }
         $this->setDefault('examination_subject_student_list', $values);
     }
 }
 public function updateDefaultsFromObject()
 {
     parent::updateDefaultsFromObject();
     if (isset($this->widgetSchema['division_preceptor_list'])) {
         $values = array();
         foreach ($this->object->getDivisionPreceptors() as $division_preceptor) {
             $values[] = $division_preceptor->getPreceptorId();
         }
         $this->setDefault('division_preceptor_list', $values);
     }
 }
Ejemplo n.º 4
0
 public function updateDefaultsFromObject()
 {
     parent::updateDefaultsFromObject();
     if (isset($this->widgetSchema['brother_list'])) {
         $values = array();
         foreach ($this->object->getBrotherhoodsRelatedByStudentId() as $brother) {
             $values[] = $brother->getBrotherId();
         }
         $this->setDefault('brother_list', $values);
     }
 }
 public function updateDefaultsFromObject()
 {
     parent::updateDefaultsFromObject();
     if (isset($this->widgetSchema['course_subject_student_list'])) {
         $values = array();
         foreach ($this->object->getCourseSubjectStudentPathways() as $course_subject_student) {
             $values[] = $course_subject_student->getStudentId();
         }
         $this->setDefault('course_subject_student_list', $values);
     }
 }
 public function updateDefaultsFromObject()
 {
     parent::updateDefaultsFromObject();
     if (isset($this->widgetSchema['preceptor_list'])) {
         $values = array();
         foreach ($this->object->getHeadPersonalPersonals() as $head_personal_personal) {
             $values[] = $head_personal_personal->getPersonalId();
         }
         $this->setDefault('preceptor_list', $values);
     }
 }