public function Edit($pa_values = null, $pa_options = null)
 {
     $o_result_context = new ResultContext($this->request, 'ca_relationship_types', 'basic_search');
     $va_cur_result = $o_result_context->getResultList();
     $vn_id = $this->request->getParameter('type_id', pInteger);
     $vn_parent_id = $this->request->getParameter('parent_id', pInteger);
     // If we're creating a new record we'll need to establish the table_num
     // from the parent (there's always a parent)
     if (!$vn_id) {
         $t_parent = new ca_relationship_types($vn_parent_id);
         if (!$t_parent->getPrimaryKey()) {
             $this->postError(1230, _t("Invalid parent"), "RelationshipTypeEditorController->Edit()");
             return;
         }
         $this->request->setParameter('table_num', $t_parent->get('table_num'));
     }
     if (!is_array($va_cur_result) || !in_array($vn_id, $va_cur_result)) {
         //
         // Set "results list" navigation to all types in the same level as the currently selected type
         //
         $t_instance = new ca_relationship_types();
         if (is_array($va_siblings = $t_instance->getHierarchySiblings($this->request->getParameter('type_id', pInteger), array('idsOnly' => true)))) {
             $o_result_context->setResultList($va_siblings);
             $o_result_context->saveContext();
         }
     }
     parent::Edit();
 }
 public function Edit($pa_values = null, $pa_options = null)
 {
     if ($this->_isDisplayEditable()) {
         return parent::Edit($pa_values, $pa_options);
     }
     return false;
 }
 public function Edit($pa_values = null, $pa_options = null)
 {
     $va_values = array();
     if ($vn_lot_id = $this->request->getParameter('lot_id', pInteger)) {
         $t_lot = new ca_object_lots($vn_lot_id);
         if ($t_lot->getPrimaryKey()) {
             $va_values['lot_id'] = $vn_lot_id;
             $va_values['idno'] = $t_lot->get('idno_stub');
         }
     }
     return parent::Edit($va_values, $pa_options);
 }
 public function Edit($pa_values = null, $pa_options = null)
 {
     list($vn_subject_id, $t_subject, $t_ui, $vn_parent_id, $vn_above_id) = $this->_initView($pa_options);
     // does user have edit access to set?
     if (!$t_subject->haveAccessToSet($this->request->getUserID(), __CA_SET_EDIT_ACCESS__, null, array('request' => $this->request))) {
         $this->notification->addNotification(_t("You cannot edit this set"), __NOTIFICATION_TYPE_ERROR__);
         $this->postError(2320, _t("Access denied"), "SetsEditorController->Delete()");
         return;
     }
     $this->view->setVar('can_delete', $this->UserCanDeleteSet($t_subject->get('user_id')));
     parent::Edit($pa_values, $pa_options);
 }
 public function Edit($pa_values = NULL, $pa_options = NULL)
 {
     parent::Edit($pa_values, $pa_options);
     // Set last browse ID so when we return to the ca_list_items hierarchy browser from
     // the editing screen it defaults to the list we just edited
     $vn_list_id = $this->request->getParameter('list_id', pInteger);
     $t_list_item = new ca_list_items();
     if ($t_list_item->load(array('list_id' => $vn_list_id, 'parent_id' => null))) {
         // root ca_list_item record for this ca_list record
         $this->request->session->setVar('ca_list_items_browse_last_id', $t_list_item->getPrimaryKey());
     }
 }
 public function Edit($pa_values = null, $pa_options = null)
 {
     $vn_ret = parent::Edit($pa_values, $pa_options);
     $t_subject = $this->view->getVar("t_subject");
     $t_set = new ca_sets($vn_set_id = $t_subject->get('set_id'));
     $va_items = $t_set->getItems(array('user_id' => $this->request->getUserID()));
     $this->opo_result_context = new ResultContext($this->request, 'ca_set_items', 'set_item_edit');
     $this->opo_result_context->setResultList(is_array($va_items) ? array_keys($va_items) : array());
     $this->opo_result_context->setParameter('set_id', $vn_set_id);
     $this->opo_result_context->setAsLastFind();
     $this->opo_result_context->saveContext();
     return $vn_ret;
 }
 public function Edit()
 {
     $o_result_context = new ResultContext($this->request, 'ca_tour_stops', 'basic_search');
     $va_cur_result = $o_result_context->getResultList();
     $vn_id = $this->request->getParameter('stop_id', pInteger);
     if (is_array($va_cur_result) && !in_array($vn_id, $va_cur_result)) {
         //
         // Set "results list" navigation to all items in the same level as the currently selected item
         //
         $t_instance = new ca_list_items();
         if (is_array($va_siblings = $t_instance->getHierarchySiblings($vn_id, array('idsOnly' => true)))) {
             $o_result_context->setResultList($va_siblings);
             $o_result_context->saveContext();
         }
     }
     parent::Edit();
 }
 /**
  *
  */
 public function Edit($pa_values = null, $pa_options = null)
 {
     $this->view->setVar('plugin_config', $this->opo_plugin_config);
     $this->view->setVar('spam_protection', isset($this->opa_ui_info['spam_protection']) && $this->opa_ui_info['spam_protection'] ? 1 : 0);
     $this->view->setVar('terms_and_conditions', isset($this->opa_ui_info['terms_and_conditions']) && $this->opa_ui_info['terms_and_conditions'] ? 1 : 0);
     $this->request->setParameter('type_id', $pa_values['type_id'] = $this->_getTypeIDForUI($this->opo_instance));
     return parent::Edit($pa_values, array('ui' => $this->ops_ui_code));
 }