/** * * @param IXP_Form_Switch $form The form object * @param \Entities\Switcher $object The Doctrine2 entity (being edited or blank for add) * @param bool $isEdit True of we are editing an object, false otherwise * @param array $options Options passed onto Zend_Form * @param string $cancelLocation Where to redirect to if 'Cancal' is clicked * @return void */ protected function formPostProcess($form, $object, $isEdit, $options = null, $cancelLocation = null) { if ($isEdit) { if ($object->getCabinet()) { $form->getElement('cabinetid')->setValue($object->getCabinet()->getId()); } if ($object->getVendor()) { $form->getElement('vendorid')->setValue($object->getVendor()->getId()); } if ($object->getInfrastructure()) { $form->getElement('infrastructure')->setValue($object->getInfrastructure()->getId()); } else { $form->getElement('infrastructure')->setValue(null); } } }
public function getCabinet() { $this->__load(); return parent::getCabinet(); }