private function updateFields(FormInterface $form) { $choices = ClientAccountOwner::getOwnerTypeChoices(); if ($this->isJoint) { if (!$this->client->isMarried()) { unset($choices['spouse']); } $form->add($this->factory->createNamed('owner_types', 'choice', null, array('mapped' => false, 'choices' => $choices, 'expanded' => true, 'multiple' => true))); } else { unset($choices['other']); $form->add($this->factory->createNamed('owner_types', 'choice', null, array('mapped' => false, 'choices' => $choices, 'expanded' => true, 'multiple' => false))); } }