本文整理汇总了PHP中setObjectValuesFromRequest函数的典型用法代码示例。如果您正苦于以下问题:PHP setObjectValuesFromRequest函数的具体用法?PHP setObjectValuesFromRequest怎么用?PHP setObjectValuesFromRequest使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setObjectValuesFromRequest函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Qunfatmps
<?php
require_once 'include/CRMSmarty.php';
require_once 'modules/Qunfatmps/Qunfatmps.php';
global $mod_strings;
global $current_user;
global $adb;
$focus = new Qunfatmps();
$smarty = new CRMSmarty();
$datetime = date("Y-m-d H:i:s");
if ($_REQUEST['mode'] == 'save') {
$qunfatmpname = $_REQUEST['qunfatmpname'];
$description = $_REQUEST['description'];
/*$qunfatmpsid = $adb->getUniqueID("ec_crmentity");
$smownerid = $current_user->id;
$query = "insert into ec_qunfatmps(qunfatmpsid,qunfatmpname,description,smownerid,smcreatorid,createdtime,modifiedtime) values({$qunfatmpsid},'{$qunfatmpname}','{$description}',{$smownerid},{$smownerid},'{$datetime}','{$datetime}');";
$adb->query($query);*/
require_once 'modules/Qunfatmps/Qunfatmps.php';
$focus = new Qunfatmps();
setObjectValuesFromRequest(&$focus);
$focus->save("Qunfatmps");
echo "<script>window.opener.document.getElementById('sendmessageinfo').value='" . $description . "';</script>";
echo "<script>window.close();</script>>";
}
$smarty->display("Qunfas/CreateTmps.tpl");
示例2: process
//.........这里部分代码省略.........
$connector = $this->getConnector($foldername);
$mail = $connector->openMail($request->get('_msgno'));
$qcreate_array = QuickCreate($moduleName);
$validationData = $qcreate_array['data'];
$data = split_validationdataArray($validationData);
$qcreate_array['form'] = $this->processFormData($qcreate_array['form'], $mail);
$viewer->assign("QUICKCREATE", $qcreate_array['form']);
if ($moduleName == 'Calendar') {
$viewer->assign("QCMODULE", getTranslatedString('Todo', 'Calendar'));
} elseif ($moduleName == "HelpDesk") {
$viewer->assign("QCMODULE", getTranslatedString('Ticket', 'HelpDesk'));
} else {
$viewer->assign("QCMODULE", getTranslatedString("SINGLE_" . $moduleName, $moduleName));
}
$viewer->assign("PARENT", $parent);
$viewer->assign("MODULE", $moduleName);
$viewer->assign('MSGNO', $request->get('_msgno'));
$viewer->assign('FOLDER', $foldername);
$viewer->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']);
$viewer->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']);
$viewer->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']);
$viewer->display($this->getModuleTpl('Relationship.CreateWizard.tpl'));
$response = false;
} else {
if ('create' == $request->getOperationArg()) {
$linkModule = $request->get('_mlinktotype');
$parent = $request->get('_mlinkto');
$focus = CRMEntity::getInstance($linkModule);
// This is added as ModComments module has a bug that will not initialize column_fields
// Basically $currentModule is set to MailManager, so the fields are not set properly.
if (empty($focus->column_fields)) {
$focus->column_fields = getColumnFields($linkModule);
}
setObjectValuesFromRequest($focus);
if ($request->get('assigntype') == 'U') {
$focus->column_fields['assigned_user_id'] = $request->get('assigned_user_id');
} elseif ($request->get('assigntype') == 'T') {
$focus->column_fields['assigned_user_id'] = $request->get('assigned_group_id');
}
$foldername = $request->get('_folder');
if (!empty($foldername)) {
// This is to handle larger uploads
$memory_limit = ConfigPrefs::get('MEMORY_LIMIT');
ini_set('memory_limit', $memory_limit);
$connector = $this->getConnector($foldername);
$mail = $connector->openMail($request->get('_msgno'));
$attachments = $mail->attachments();
// Initialize attachments
}
$linkedto = MailManager_RelationControllerAction::getSalesEntityInfo($parent);
switch ($linkModule) {
case 'Calendar':
if (empty($focus->column_fields['activitytype'])) {
$focus->column_fields['activitytype'] = 'Task';
}
if (empty($focus->column_fields['due_date'])) {
if (!empty($focus->column_fields['date_start'])) {
$dateStart = getValidDBInsertDateValue($focus->column_fields['date_start']);
$focus->column_fields['due_date'] = date("Y-m-d", strtotime(date("Y-m-d", strtotime($dateStart)) . " +1 day"));
} else {
$focus->column_fields['due_date'] = date('Y-m-d', strtotime("+1 day"));
}
}
if (!empty($parent)) {
if ($linkedto['module'] == 'Contacts') {
$focus->column_fields['contact_id'] = $parent;