/** * Preparation hook that can be overridden by subclasses for add and edit. * * This is called just before we process a possible POST / submission and * will allow us to change / alter the form or object. * * @param IXP_Form_Meeting $form The Send form object * @param \Entities\Meeting $object The Doctrine2 entity (being edited or blank for add) * @param bool $isEdit True if we are editing, otherwise false */ protected function addPrepare($form, $object, $isEdit) { if ($isEdit) { $form->getElement('date')->setValue($object->getDate()->format('Y-m-d')); $form->getElement('time')->setValue($object->getTime()->format('H:i')); } return true; }