/** * Bind an object to the form * * Ensures the object is populated with validated values. * * @param object $object * @param int $flags ,default value is FormInterface::VALUES_NORMALIZED * @return mixed|void * @throws Exception\InvalidArgumentException */ public function bind($object, $flags = FormInterface::VALUES_NORMALIZED) { parent::bind($object, $flags); // remove addMore button from edit form $this->remove("addMore"); }
public function bind($object, $flags = FormInterface::VALUES_NORMALIZED) { parent::bind($object, $flags); // // $users = $object->getOrganizationUsers(); // // // $focalContactPerson = $object->getFocalContactPerson(); if (isset($focalContactPerson->id) && $focalContactPerson != null) { $this->get('focalContactPerson_id')->setValue($focalContactPerson->id); } }