• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP setObjectValuesFromRequest函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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");
开发者ID:honj51,项目名称:taobaocrm,代码行数:25,代码来源:CreateTmps.php


示例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;
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:67,代码来源:RelationController.php



注:本文中的setObjectValuesFromRequest函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP setOnFormError函数代码示例发布时间:2022-05-15
下一篇:
PHP setNotification函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap