/** * * @param Institution $institution * @param unknown_type $propertyTypeName * @return InstitutionPropertyCustomFormType */ public function buildFormByInstitutionPropertyTypeName(Institution $institution, $propertyTypeName) { $institutionProperty = $this->institutionPropertyService->createInstitutionPropertyByName($propertyTypeName, $institution); $formType = new InstitutionPropertyCustomFormType(); return $this->formFactory->create($formType, $institutionProperty); }
/** * @expectedException HealthCareAbroad\InstitutionBundle\Exception\InstitutionPropertyException */ public function testCreateInstitutionPropertyByNonExistentName() { $property = $this->service->createInstitutionPropertyByName('some_unknown_property_type'); }
/** * Check if $institution has a property type value of $value * * @param Institution $institution * @param InstitutionPropertyType $propertyType * @param mixed $value * @return boolean * @deprecated added for BC */ public function hasPropertyValue(Institution $institution, InstitutionPropertyType $propertyType, $value) { return $this->institutionPropertyService->hasPropertyValue($institution, $propertyType, $value); }