function _valid_perform(&$request, &$response) { $object_data =& $this->_load_object_data(); $data_to_import['id'] = $object_data['id']; $data_to_import['node_id'] = $object_data['node_id']; $data_to_import['parent_node_id'] = $object_data['parent_node_id']; $data_to_import['identifier'] = $object_data['identifier']; $data_to_import['title'] = $object_data['title']; complex_array :: map($this->datamap, $this->dataspace->export(), $data_to_import); if (!isset($data_to_import['status'])) $data_to_import['status'] = $object_data['status']; $this->object->import_attributes($data_to_import); if(!$this->_update_object_operation()) { $request->set_status(REQUEST_STATUS_FAILURE); return; } $this->indexer->add($this->object); if(isset($data_to_import['identifier']) && $object_data['identifier'] != $data_to_import['identifier']) { $this->_handle_changed_identifier($data_to_import['identifier']); } $request->set_status(REQUEST_STATUS_FORM_SUBMITTED); fetcher :: flush_cache(); }
function _valid_perform() { $object_data =& $this->_load_object_data(); $data['id'] = $object_data['id']; $data['node_id'] = $object_data['node_id']; $data['identifier'] = $object_data['identifier']; $data['title'] = $object_data['title']; complex_array::map($this->definition['datamap'], $this->dataspace->export(), $data); if (!isset($data['status'])) { $data['status'] = $object_data['status']; } $this->object->import_attributes($data); if (!$this->_update_object_operation()) { return false; } $this->indexer->add($this->object); if (isset($data['identifier']) && $object_data['identifier'] != $data['identifier']) { $this->_handle_changed_identifier($data['identifier']); } return true; }
function _valid_perform() { $object_data =& $this->_load_object_data(); $data_to_import['id'] = $object_data['id']; $data_to_import['node_id'] = $object_data['node_id']; $data_to_import['parent_node_id'] = $object_data['parent_node_id']; $data_to_import['identifier'] = $object_data['identifier']; $data_to_import['title'] = $object_data['title']; complex_array::map($this->definition['datamap'], $this->dataspace->export(), $data_to_import); if (!isset($data_to_import['status'])) { $data_to_import['status'] = $object_data['status']; } $this->object->import_attributes($data_to_import); if (!$this->_update_object_operation()) { return new failed_response(); } $this->indexer->add($this->object); if (isset($data_to_import['identifier']) && $object_data['identifier'] != $data_to_import['identifier']) { $this->_handle_changed_identifier($data_to_import['identifier']); } return new response(RESPONSE_STATUS_FORM_SUBMITTED); }
function _valid_perform_prepare_data(&$data) { complex_array::map($this->datamap, $this->dataspace->export(), $data); }