public function printRegistrationAction() { $id = (int) $this->_getParam('id'); $page = $this->_getParam('page'); $lang = $this->_getParam('lang'); if (!$lang) { $this->_registry->currentEditLanguage = $this->_defaultEditLanguage; $langId = $this->_defaultEditLanguage; } else { $langId = Cible_FunctionsGeneral::getLanguageID($lang); $this->_registry->currentEditLanguage = $langId; } if ($this->view->aclIsAllowed($this->_moduleTitle, 'edit', true)) { $firstPData = array(); $secPData = array(); $oMember = new MemberProfilesObject(); $oGeneric = new GenericProfilesObject(); $oMedic = new MedicalProfilesObject(); $oDiseasesD = new DiseasesDetailsObject(); $oParent = new ParentProfilesObject(); $oAddress = new AddressObject(); $sections = $oMember->_sectionSrc(); $memberData = $oMember->populate($id, $langId); $data = $oGeneric->populate($memberData['MP_GenericProfileId'], $langId); $medicData = $oMedic->populate($memberData['MP_GenericProfileId'], $langId); $allergies = $oMedic->_allergySrc(); $diseases = $oMedic->_diseasesSrc(); $diseasesDetails = $oDiseasesD->setFilters(array($oDiseasesD->getForeignKey() => $id)); $diseasesDetails = $oDiseasesD->getAll(); $memberData = array_merge($memberData, $data, $medicData); $this->view->title = 'Membre : ' . $memberData['GP_LastName'] . ' ' . $memberData['GP_FirstName']; $resp = $oParent->_listRespSrc(); $roles = $oParent->_parentsProfileSrc(); if (!empty($data['MP_FirstParent'])) { $firstPData = $oParent->populate($memberData['MP_FirstParent'], $langId); if (empty($firstPData)) { $firstPData = $oParent->populate($memberData['MP_GenericProfileId'], $langId); } $data = $oGeneric->populate($firstPData['PP_GenericProfileId'], $langId); $firstPData = array_merge($firstPData, $data); $address = $oAddress->populate($firstPData['PP_AddressId'], $langId); $firstPData['address'] = $address; } if (!empty($data['MP_SecondParent'])) { $secPData = $oParent->populate($memberData['MP_SecondParent'], $langId); $data = $oGeneric->populate($secPData['PP_GenericProfileId'], $langId); $secPData = array_merge($secPData, $data); $address = $oAddress->populate($secPData['PP_AddressId'], $langId); $secPData['address'] = $address; } $this->view->dataMember = $memberData; $this->view->parents = array($firstPData, $secPData); $this->view->sections = $sections; $this->view->resp = $resp; $this->view->roles = $roles; $this->view->allergies = $allergies; $this->view->diseases = $diseases; $this->view->diseasesDetails = $diseasesDetails; $this->view->typeMedic = $oDiseasesD->_typeMedicSrc(); } }