本文整理汇总了PHP中Vtiger_Request::getRaw方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Request::getRaw方法的具体用法?PHP Vtiger_Request::getRaw怎么用?PHP Vtiger_Request::getRaw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Request
的用法示例。
在下文中一共展示了Vtiger_Request::getRaw方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: process
public function process(Vtiger_Request $request)
{
$db = PearDatabase::getInstance();
$qualifiedModuleName = $request->getModule(false);
$moduleName = $request->getModule();
$baseModule = $request->get('base_module');
$tpl_id = $request->get('tpl_id');
if ($request->get('s') == '' || $request->get('s') == 'true') {
$summary = $request->get('summary');
$conditionAll = $request->getRaw('condition_all_json');
$conditionOption = $request->getRaw('condition_option_json');
if ($tpl_id != '') {
$insertBaseRecord = "UPDATE vtiger_dataaccess SET module_name = ?, summary = ? WHERE dataaccessid = ?";
$db->pquery($insertBaseRecord, array($baseModule, $summary, $tpl_id), true);
Settings_DataAccess_Module_Model::updateConditions($conditionAll, $tpl_id);
Settings_DataAccess_Module_Model::updateConditions($conditionOption, $tpl_id, FALSE);
} else {
$insertBaseRecord = "INSERT INTO vtiger_dataaccess (module_name,summary) VALUES(?,?)";
$db->pquery($insertBaseRecord, array($baseModule, $summary), true);
$tpl_id = $db->getLastInsertID();
Settings_DataAccess_Module_Model::addConditions($conditionAll, $tpl_id);
Settings_DataAccess_Module_Model::addConditions($conditionOption, $tpl_id, FALSE);
}
}
$DataAccess = Settings_DataAccess_Module_Model::getDataAccessInfo($tpl_id, false);
$viewer = $this->getViewer($request);
$viewer->assign('STEP', 3);
$viewer->assign('TPL_ID', $tpl_id);
$viewer->assign('MODULE_NAME', $moduleName);
$viewer->assign('REQUEST', $request);
$viewer->assign('BASE_MODULE', $baseModule);
$viewer->assign('ACTIONS_SELECTED', $DataAccess['basic_info']['data']);
$viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
echo $viewer->view('Step3.tpl', $qualifiedModuleName, true);
}
示例2: process
public function process(Vtiger_Request $request)
{
$baseModule = $request->get('base_module');
$summary = $request->get('summary');
$tplId = $request->get('tpl_id');
$conditionAll = $request->getRaw('condition_all_json');
$conditionOption = $request->getRaw('condition_option_json');
$db = PearDatabase::getInstance();
$insertBaseRecord = "UPDATE vtiger_dataaccess SET module_name = ?, summary = ? WHERE dataaccessid = ?";
$db->pquery($insertBaseRecord, array($baseModule, $summary, $tplId), true);
Settings_DataAccess_Module_Model::updateConditions($conditionAll, $tplId);
Settings_DataAccess_Module_Model::updateConditions($conditionOption, $tplId, FALSE);
header("Location: index.php?module=DataAccess&parent=Settings&view=Index");
}
示例3: process
public function process(Vtiger_Request $request)
{
$baseModule = $request->get('base_module');
$summary = $request->get('summary');
$conditionAll = $request->getRaw('condition_all_json');
$conditionOption = $request->getRaw('condition_option_json');
$db = PearDatabase::getInstance();
$insertBaseRecord = "INSERT INTO vtiger_dataaccess VALUES(?, ?, ?)";
$db->pquery($insertBaseRecord, array(NULL, $baseModule, $summary), true);
$recordId = $db->getLastInsertID();
Settings_DataAccess_Module_Model::addConditions($conditionAll, $recordId);
Settings_DataAccess_Module_Model::addConditions($conditionOption, $recordId, FALSE);
header("Location: index.php?module=DataAccess&parent=Settings&view=Index");
}
示例4: getRecordModelFromRequest
protected function getRecordModelFromRequest(Vtiger_Request $request)
{
$moduleName = $request->getModule();
$recordId = $request->get('record');
$moduleModel = Vtiger_Module_Model::getInstance($moduleName);
if (!empty($recordId)) {
$recordModel = Vtiger_Record_Model::getInstanceById($recordId, $moduleName);
$modelData = $recordModel->getData();
$recordModel->set('id', $recordId);
$recordModel->set('mode', 'edit');
} else {
$recordModel = Vtiger_Record_Model::getCleanInstance($moduleName);
$modelData = $recordModel->getData();
$recordModel->set('mode', '');
}
$fieldModelList = $moduleModel->getFields();
foreach ($fieldModelList as $fieldName => $fieldModel) {
if (in_array($fieldName, array('header_content', 'content', 'footer_content'))) {
$fieldValue = $request->getRaw($fieldName, null);
} else {
$fieldValue = $request->get($fieldName, null);
}
$fieldDataType = $fieldModel->getFieldDataType();
if ($fieldDataType == 'time') {
$fieldValue = Vtiger_Time_UIType::getTimeValueWithSeconds($fieldValue);
}
if ($fieldValue !== null) {
if (!is_array($fieldValue)) {
$fieldValue = trim($fieldValue);
}
$recordModel->set($fieldName, $fieldValue);
}
}
return $recordModel;
}
示例5: process
public function process(Vtiger_Request $request)
{
$baseModule = $request->get('base_module');
$summary = $request->get('summary');
$docFolder = $request->get('doc_folder');
$docName = $request->get('doc_name');
$docRequest = $request->get('doc_request');
$docOrder = $request->get('doc_order');
$conditionAll = $request->getRaw('condition_all_json');
$conditionOption = $request->getRaw('condition_option_json');
$db = PearDatabase::getInstance();
$insertBaseRecord = "INSERT INTO vtiger_ossdocumentcontrol VALUES(?, ?, ?, ?, ?, ?, ?)";
$db->pquery($insertBaseRecord, array(NULL, $baseModule, $summary, $docFolder, $docName, $docRequest, $docOrder), true);
$recordId = $db->getLastInsertID();
$this->addConditions($conditionAll, $recordId);
$this->addConditions($conditionOption, $recordId, FALSE);
header("Location: index.php?module=OSSDocumentControl&parent=Settings&view=Index");
}
示例6: process
public function process(Vtiger_Request $request)
{
$baseModule = $request->get('base_module');
$summary = $request->get('summary');
$docFolder = $request->get('doc_folder');
$docName = $request->get('doc_name');
$docRequest = $request->get('doc_request');
$tplId = $request->get('tpl_id');
$docOrder = (int) $request->get('doc_order');
//var_dump($docOrder);
$conditionAll = $request->getRaw('condition_all_json');
$conditionOption = $request->getRaw('condition_option_json');
$db = PearDatabase::getInstance();
$insertBaseRecord = "UPDATE vtiger_ossdocumentcontrol SET module_name = ?, summary = ?, doc_folder = ?, doc_name = ?, doc_request = ?, doc_order = ? WHERE ossdocumentcontrolid = ?";
$db->pquery($insertBaseRecord, array($baseModule, $summary, $docFolder, $docName, $docRequest, $docOrder, $tplId), true);
$this->updateConditions($conditionAll, $tplId);
$this->updateConditions($conditionOption, $tplId, FALSE);
header("Location: index.php?module=OSSDocumentControl&parent=Settings&view=Index");
}
示例7: NoteBookCreate
function NoteBookCreate(Vtiger_Request $request)
{
$adb = PearDatabase::getInstance();
$userModel = Users_Record_Model::getCurrentUserModel();
$linkId = $request->get('linkId');
$noteBookName = $request->getRaw('notePadName');
$noteBookContent = $request->getRaw('notePadContent');
$date_var = date("Y-m-d H:i:s");
$date = $adb->formatDate($date_var, true);
$dataValue = array();
$dataValue['contents'] = $noteBookContent;
$dataValue['lastSavedOn'] = $date;
$data = Zend_Json::encode((object) $dataValue);
$query = "INSERT INTO vtiger_module_dashboard_widgets(linkid, userid, filterid, title, data) VALUES(?,?,?,?,?)";
$params = array($linkId, $userModel->getId(), 0, $noteBookName, $data);
$adb->pquery($query, $params);
$id = $adb->getLastInsertID();
$result = array();
$result['success'] = TRUE;
$result['widgetId'] = $id;
$response = new Vtiger_Response();
$response->setResult($result);
$response->emit();
}
示例8: rename
public function rename(Vtiger_Request $request)
{
$moduleName = $request->get('source_module');
$newValue = $request->getRaw('newValue');
$pickListFieldName = $request->get('picklistName');
$oldValue = $request->get('oldValue');
$moduleModel = new Settings_Picklist_Module_Model();
$response = new Vtiger_Response();
try {
$status = $moduleModel->renamePickListValues($pickListFieldName, $oldValue, $newValue, $moduleName);
$response->setResult(array('success', $status));
} catch (Exception $e) {
$response->setError($e->getCode(), $e->getMessage());
}
$response->emit();
}
示例9: showEditView
public function showEditView(Vtiger_Request $request)
{
$module = $request->get('source_module');
$pickListFieldId = $request->get('pickListFieldId');
$fieldModel = Settings_Picklist_Field_Model::getInstance($pickListFieldId);
$valueToEdit = $request->getRaw('fieldValue');
$selectedFieldEditablePickListValues = $fieldModel->getEditablePicklistValues($fieldModel->getName());
$selectedFieldNonEditablePickListValues = $fieldModel->getNonEditablePicklistValues($fieldModel->getName());
// $selectedFieldAllPickListValues = array_map('Vtiger_Util_Helper::toSafeHTML', $selectedFieldAllPickListValues);
$qualifiedName = $request->getModule(false);
$viewer = $this->getViewer($request);
$moduleName = $request->getModule();
$viewer->assign('SOURCE_MODULE', $module);
$viewer->assign('SOURCE_MODULE_NAME', $module);
$viewer->assign('FIELD_MODEL', $fieldModel);
$viewer->assign('FIELD_VALUE', $valueToEdit);
$viewer->assign('SELECTED_PICKLISTFIELD_EDITABLE_VALUES', $selectedFieldEditablePickListValues);
$viewer->assign('SELECTED_PICKLISTFIELD_NON_EDITABLE_VALUES', $selectedFieldNonEditablePickListValues);
$viewer->assign('MODULE', $moduleName);
$viewer->assign('QUALIFIED_MODULE', $qualifiedName);
echo $viewer->view('EditView.tpl', $qualifiedName, true);
}
示例10: Save
public function Save(Vtiger_Request $request)
{
$workflowId = $request->get('for_workflow');
if (!empty($workflowId)) {
$record = $request->get('task_id');
if ($record) {
$taskRecordModel = Settings_Workflows_TaskRecord_Model::getInstance($record);
} else {
$workflowModel = Settings_Workflows_Record_Model::getInstance($workflowId);
$taskRecordModel = Settings_Workflows_TaskRecord_Model::getCleanInstance($workflowModel, $request->get('taskType'));
}
$taskObject = $taskRecordModel->getTaskObject();
$taskObject->summary = $request->get("summary");
$active = $request->get("active");
if ($active == "true") {
$taskObject->active = true;
} else {
if ($active == "false") {
$taskObject->active = false;
}
}
$checkSelectDate = $request->get('check_select_date');
if (!empty($checkSelectDate)) {
$trigger = array('days' => ($request->get('select_date_direction') == 'after' ? 1 : -1) * (int) $request->get('select_date_days'), 'field' => $request->get('select_date_field'));
$taskObject->trigger = $trigger;
} else {
$taskObject->trigger = null;
}
$fieldNames = $taskObject->getFieldNames();
foreach ($fieldNames as $fieldName) {
if ($fieldName == 'field_value_mapping') {
$taskObject->{$fieldName} = $request->getRaw($fieldName);
} else {
$taskObject->{$fieldName} = $request->get($fieldName);
}
if ($fieldName == 'calendar_repeat_limit_date') {
$taskObject->{$fieldName} = DateTimeField::convertToDBFormat($request->get($fieldName));
}
}
$taskType = get_class($taskObject);
if ($taskType === 'VTCreateEntityTask') {
$relationModuleModel = Vtiger_Module_Model::getInstance($taskObject->entity_type);
$ownerFieldModels = $relationModuleModel->getFieldsByType('owner');
$fieldMapping = Zend_Json::decode($taskObject->field_value_mapping);
foreach ($fieldMapping as $key => $mappingInfo) {
if (array_key_exists($mappingInfo['fieldname'], $ownerFieldModels)) {
$userRecordModel = Users_Record_Model::getInstanceById($mappingInfo['value'], 'Users');
$ownerName = $userRecordModel->get('user_name');
if (!$ownerName) {
$groupRecordModel = Settings_Groups_Record_Model::getInstance($mappingInfo['value']);
$ownerName = $groupRecordModel->getName();
}
$fieldMapping[$key]['value'] = $ownerName;
}
}
$taskObject->field_value_mapping = Zend_Json::encode($fieldMapping);
}
$taskRecordModel->save();
$response = new Vtiger_Response();
$response->setResult(array('for_workflow' => $workflowId));
$response->emit();
}
}
示例11: enableOrDisable
public function enableOrDisable(Vtiger_Request $request)
{
$pickListFieldName = $request->get('picklistName');
$enabledValues = $request->getRaw('enabled_values', array());
$disabledValues = $request->getRaw('disabled_values', array());
$roleSelected = $request->get('rolesSelected');
$moduleModel = new Settings_Picklist_Module_Model();
$response = new Vtiger_Response();
try {
$moduleModel->enableOrDisableValuesForRole($pickListFieldName, $enabledValues, $disabledValues, array($roleSelected));
$response->setResult(array('success', true));
} catch (Exception $e) {
$response->setError($e->getCode(), $e->getMessage());
}
$response->emit();
}