public function createInstitutionMedicalCenterPropertyByServices(InstitutionMedicalCenterProperty $imcProperty) { $institution = $imcProperty->getInstitution(); $center = $imcProperty->getInstitutionMedicalCenter(); $imcType = $imcProperty->getInstitutionPropertyType(); $imcArray = $imcProperty->getValue(); if (\is_array($imcArray)) { foreach ($imcArray as $key => $value) { $imcProperty = new InstitutionMedicalCenterProperty(); $imcProperty->setInstitution($institution); $imcProperty->setInstitutionPropertyType($imcType); $imcProperty->setInstitutionMedicalCenter($center); $imcProperty->setValue($value); $this->save($imcProperty); } } else { $this->save($imcProperty); } }
public function __construct(InstitutionMedicalCenterProperty $imcProperty) { $this->parent = $imcProperty->getInstitutionPropertyType()->getDataType()->getFormField(); $this->imcProperty = $imcProperty; }