/** * @deprecated ? * @param InstitutionMedicalCenter $institutionMedicalCenter */ public function getGroupedMedicalCenterGlobalAwards(InstitutionMedicalCenter $institutionMedicalCenter) { $awardTypes = GlobalAwardTypes::getTypes(); $globalAwards = \array_flip(GlobalAwardTypes::getTypeKeys()); // initialize holder for awards foreach ($globalAwards as $k => $v) { $globalAwards[$k] = array(); } $imcProperties = $this->institutionMedicalCenterPropertyService->getGlobalAwardPropertiesByInstitutionMedicalCenter($institutionMedicalCenter); foreach ($imcProperties as $imcp_arr) { if (!empty($imcp_arr)) { foreach ($imcp_arr as $imcp) { $_globalAward = $imcp->getValueObject(); $globalAwards[\strtolower($awardTypes[$_globalAward->getType()])][] = $imcp; } } } // foreach ($this->getMedicalCenterGlobalAwards($institutionMedicalCenter) as $_globalAward) { // $globalAwards[\strtolower($awardTypes[$_globalAward->getType()])][] = array( // 'global_award' => $_globalAward, // ); // } return $globalAwards; }
/** * * @param Institution $institution * @param InstitutionMedicalCenter $institutionMedicalCenter * @param unknown_type $propertyTypeName * @return InstitutionMedicalCenterPropertyCustomFormType */ public function buildFormByInstitutionMedicalCenterPropertyTypeName(Institution $institution, InstitutionMedicalCenter $center, $propertyTypeName) { $imcProperty = $this->imcPropertyService->createInstitutionMedicalCenterPropertyByName($propertyTypeName, $institution, $center); $formType = new InstitutionMedicalCenterPropertyCustomFormType(); return $this->formFactory->create($formType, $imcProperty); }