/**
  * Render edit page
  */
 public function editAction()
 {
     $enumerationId = $this->_getParam("enumerationId", null);
     $parentId = $this->_getParam("parentId", null);
     $category = $this->_getParam('category', null);
     $this->view->ormClass = $this->_getParam('ormClass', null);
     $this->view->enumerationId = $enumerationId;
     $this->_enum = new Enumeration();
     if ($enumerationId !== null && is_numeric($enumerationId)) {
         $this->_enum->enumerationId = (int) $enumerationId;
         $this->_enum->populate();
     }
     if ($category !== null) {
         $this->_enum->category = $category;
     }
     if (!strlen($this->_enum->ormEditMethod) > 0) {
         $this->_enum->ormEditMethod = 'ormEditMethod';
     }
     $this->_form = new WebVista_Form(array("name" => "edit-enumeration"));
     $this->_form->setAction(Zend_Registry::get('baseUrl') . "enumerations-manager.raw/process-edit");
     $this->_form->loadORM($this->_enum, "enumeration");
     $this->_form->setWindow("windowEditEnumerationId");
     $this->view->form = $this->_form;
     $this->view->categoryIterator = Enumeration::getIterByDistinctCategories();
     if ($parentId !== null && is_numeric($parentId)) {
         $parent = new Enumeration();
         $parent->enumerationId = (int) $parentId;
         $parent->populate();
         $this->view->parent = $parent;
     }
     $this->view->grid = $this->_getParam('grid');
     $this->render("edit");
 }
 /**
  * Render edit page
  */
 public function editAction()
 {
     $enumerationId = (int) $this->_getParam('enumerationId');
     $parentId = (int) $this->_getParam('parentId');
     $category = $this->_getParam('category', null);
     $this->view->ormClass = $this->_getParam('ormClass', null);
     $this->view->enumerationId = $enumerationId;
     $enum = new Enumeration();
     if ($enumerationId > 0) {
         $enum->enumerationId = $enumerationId;
         $enum->populate();
     }
     if ($category !== null) {
         $enum->category = $category;
     }
     if (!strlen($enum->ormEditMethod) > 0) {
         $enum->ormEditMethod = 'ormEditMethod';
     }
     if ($parentId > 0) {
         $parent = new Enumeration();
         $parent->enumerationId = (int) $parentId;
         $parent->populate();
         $this->view->parent = $parent;
         if ($parent->name == 'Facilities') {
             $this->view->ormClass = 'Practice';
             // overrides ormClass
         }
     }
     $form = new WebVista_Form(array("name" => "edit-enumeration"));
     $form->setAction(Zend_Registry::get('baseUrl') . "enumerations-manager.raw/process-edit");
     $form->loadORM($enum, "enumeration");
     $form->setWindow('windowEditORMObjectId');
     $this->view->form = $form;
     $this->view->categoryIterator = Enumeration::getIterByDistinctCategories();
     $this->view->grid = $this->_getParam('grid');
     $this->render('edit');
 }