public function edit($nNavigationMenuId, $aData) { $oModelNavigationResource = new Admin_Model_NavigationResource(); $oModelNavigationOption = new Admin_Model_NavigationOption(); $oGenereteSessionId = new AppCms2_GenereteSessionId(); try { $this->_db->beginTransaction(); $oRow = $this->find($nNavigationMenuId)->current(); if ($oRow instanceof Zend_Db_Table_Row_Abstract) { $oRow->label = $aData["label"]; $oRow->desc = $aData["desc"]; $oRow->image_id = $aData["image_id"]; $oRow->visible = $aData["visible"]; if ($oRow->save()) { $aGenereteSessionId = $oGenereteSessionId->generatePassword(); $sNavigationResource = "menu_resource_{$aData["navigation_module_id"]}_{$aData["navigation_controller_id"]}_{$aData["navigation_action_id"]}_{$aGenereteSessionId["user_password"]}"; $nNavigationResourceId = $oModelNavigationResource->add($sNavigationResource); if (isset($nNavigationResourceId)) { $aData["navigation_resource_id"] = $nNavigationResourceId; $nNavigationOptionId = $oRow->navigation_option_id; if ($oModelNavigationOption->edit($nNavigationOptionId, $aData)) { $this->_db->commit(); return $nNavigationOptionId; } } } } $this->_db->rollBack(); return null; } catch (Zend_Exception $e) { $this->_db->rollBack(); return null; } }