/**
  *
  * @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
  * @return void
  */
 protected function addPostValidate($form, $object, $isEdit)
 {
     $object->setCabinet($this->getD2EM()->getRepository('\\Entities\\Cabinet')->find($form->getElement('cabinetid')->getValue()));
     $object->setVendor($this->getD2EM()->getRepository('\\Entities\\Vendor')->find($form->getElement('vendorid')->getValue()));
     if ($form->getElement('infrastructure')->getValue()) {
         $object->setInfrastructure($this->getD2EM()->getRepository('\\Entities\\Infrastructure')->find($form->getElement('infrastructure')->getValue()));
     }
     return true;
 }
 public function setCabinet(\Entities\Cabinet $cabinet = NULL)
 {
     $this->__load();
     return parent::setCabinet($cabinet);
 }