当前位置: 首页>>代码示例>>PHP>>正文


PHP Activity::retrieve_entity_info方法代码示例

本文整理汇总了PHP中Activity::retrieve_entity_info方法的典型用法代码示例。如果您正苦于以下问题:PHP Activity::retrieve_entity_info方法的具体用法?PHP Activity::retrieve_entity_info怎么用?PHP Activity::retrieve_entity_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Activity的用法示例。


在下文中一共展示了Activity::retrieve_entity_info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: repeat

 /**
  * Repeat Activity instance till given limit.
  */
 static function repeat($focus)
 {
     global $log;
     $repeat = getrecurringObjValue();
     $frequency = $repeat->recur_freq;
     $repeattype = $repeat->recur_type;
     $base_focus = new Activity();
     $base_focus->retrieve_entity_info($focus->id, 'Events');
     $base_focus->id = $_REQUEST['record'];
     $base_focus_start = $base_focus->column_fields['date_start'] . ' ' . $base_focus->column_fields['time_start'];
     $base_focus_end = $base_focus->column_fields['due_date'] . ' ' . $base_focus->column_fields['time_end'];
     $repeat_limit = getDBInsertDateValue($_REQUEST['calendar_repeat_limit_date']) . ' ' . $base_focus->column_fields['time_start'];
     $repeatIntervals = self::getRepeatInterval($repeattype, $frequency, $repeat, $base_focus_start, $repeat_limit);
     $base_focus_start = self::mktime($base_focus_start);
     $base_focus_end = self::mktime($base_focus_end);
     $skip_focus_fields = array('record_id', 'createdtime', 'modifiedtime', 'recurringtype');
     /** Create instance before and reuse */
     $new_focus = new Activity();
     foreach ($repeatIntervals as $interval) {
         $new_focus_start_timing = self::nexttime($base_focus_start, "+{$interval} days");
         $new_focus_start_timing = self::splittime(self::formattime($new_focus_start_timing));
         $new_focus_end_timing = self::nexttime($base_focus_end, "+{$interval} days");
         $new_focus_end_timing = self::splittime(self::formattime($new_focus_end_timing));
         // Reset the new_focus and prepare for reuse
         if (isset($new_focus->id)) {
             unset($new_focus->id);
         }
         foreach ($new_focus->column_fields as $key => $value) {
             $new_focus->column_fields[$key] = '';
         }
         foreach ($base_focus->column_fields as $key => $value) {
             if (in_array($key, $skip_focus_fields)) {
                 // skip copying few fields
             } else {
                 if ($key == 'date_start') {
                     $new_focus->column_fields['date_start'] = $new_focus_start_timing[0];
                 } else {
                     if ($key == 'time_start') {
                         $new_focus->column_fields['time_start'] = $new_focus_start_timing[1];
                     } else {
                         if ($key == 'time_end') {
                             $new_focus->column_fields['time_end'] = $new_focus_end_timing[1];
                         } else {
                             if ($key == 'due_date') {
                                 $new_focus->column_fields['due_date'] = $new_focus_end_timing[0];
                             } else {
                                 $new_focus->column_fields[$key] = $value;
                             }
                         }
                     }
                 }
             }
         }
         $new_focus->save('Calendar');
     }
 }
开发者ID:vtiger-jp,项目名称:vtigercrm-5.1.x-ja,代码行数:59,代码来源:RepeatEvents.php

示例2: UpdateClndr

function UpdateClndr($username, $session, $clndrdtls)
{
    if (!validateSession($username, $session)) {
        return null;
    }
    global $current_user;
    global $adb, $log;
    require_once 'modules/Users/Users.php';
    require_once 'modules/Calendar/Activity.php';
    $seed_user = new Users();
    $user_id = $seed_user->retrieve_user_id($username);
    $current_user = $seed_user;
    $current_user->retrieve_entity_info($user_id, "Users");
    require 'user_privileges/user_privileges_' . $current_user->id . '.php';
    require 'user_privileges/sharing_privileges_' . $current_user->id . '.php';
    if ($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) {
        $sql1 = "select fieldname,columnname from vtiger_field where tabid=16 and vtiger_field.presence in (0,2)";
        $params1 = array();
    } else {
        $profileList = getCurrentUserProfileList();
        $sql1 = "select fieldname,columnname from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=16 and vtiger_field.displaytype in (1,2,4,3) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)";
        $params1 = array();
        if (count($profileList) > 0) {
            $sql1 .= " and vtiger_profile2field.profileid in (" . generateQuestionMarks($profileList) . ")";
            array_push($params1, $profileList);
        }
    }
    $result1 = $adb->pquery($sql1, $params1);
    for ($i = 0; $i < $adb->num_rows($result1); $i++) {
        $permitted_lists[] = $adb->query_result($result1, $i, 'fieldname');
    }
    $clndr = new Activity();
    foreach ($clndrdtls as $clndrow) {
        if (isset($clndrow)) {
            $astartdtm = explode(" ", $clndrow["startdate"]);
            $aduedtm = explode(" ", $clndrow["duedate"]);
            $atimestart = explode(":", trim($astartdtm[1]));
            $atimedue = explode(":", trim($aduedtm[1]));
            $stimestart = $atimestart[0] . ":" . $atimestart[1];
            $stimeend = $atimedue[0] . ":" . $atimedue[1];
            /*if( $diff=@get_time_difference($stimestart, $stimeend) )
            		{
            			$stimeduehr = sprintf('%02d',$diff['hours']);
            			$stimeduemin = sprintf('%02d',$diff['minutes']);
            		}*/
            $clndr->retrieve_entity_info($clndrow["id"], "Calendar");
            $clndr->column_fields[subject] = in_array('subject', $permitted_lists) ? $clndrow["subject"] : "";
            $clndr->column_fields[date_start] = in_array('date_start', $permitted_lists) ? getDisplayDate(trim($astartdtm[0])) : "";
            $clndr->column_fields[due_date] = in_array('due_date', $permitted_lists) ? getDisplayDate(trim($aduedtm[0])) : "";
            $clndr->column_fields[time_start] = in_array('time_start', $permitted_lists) ? $stimestart : "";
            $clndr->column_fields[time_end] = in_array('time_end', $permitted_lists) ? $stimeend : "";
            //$clndr->column_fields[duration_hours]= in_array('duration_hours',$permitted_lists) ? $stimeduehr : "";
            //$clndr->column_fields[duration_minutes]= in_array('duration_minutes',$permitted_lists) ? $stimeduemin : "";
            $clndr->column_fields[location] = in_array('location', $permitted_lists) ? $clndrow["location"] : "";
            $clndr->column_fields[description] = in_array('description', $permitted_lists) ? $clndrow["description"] : "";
            $clndr->column_fields[activitytype] = "Meeting";
            $clndr->column_fields[assigned_user_id] = in_array('assigned_user_id', $permitted_lists) ? $user_id : "";
            $clndr->id = $clndrow["id"];
            $clndr->mode = "edit";
            $clndr->save("Calendar");
        }
    }
    return $clndr->id;
}
开发者ID:hardikk,项目名称:HNH,代码行数:64,代码来源:vtigerolservice.php

示例3: getEventActivityMode

    $activity_mode = getEventActivityMode($record);
}
$tab_type = 'Calendar';
if ($activity_mode == 'Events') {
    $tab_type = 'Events';
}
$search = vtlib_purify($_REQUEST['search_url']);
$focus->column_fields["activitytype"] = 'Task';
if (isset($record)) {
    $focus->id = $_REQUEST['record'];
    $local_log->debug("id is " . $id);
}
if ($_REQUEST['mode'] == "event_drop" || $_REQUEST['mode'] == "event_resize") {
    $activityid = $focus->id;
    if (isPermitted("Calendar", "EditView", $activityid) == 'yes') {
        $focus->retrieve_entity_info($focus->id, $tab_type);
        $focus->mode = "edit";
        $day_drop = $_REQUEST['day'];
        $minute_drop = $_REQUEST['minute'];
        $Act = $focus->column_fields;
        foreach ($focus->column_fields as $fieldname => $val) {
            $focus->column_fields[$fieldname] = decode_html($focus->column_fields[$fieldname]);
        }
        if ($day_drop > 0) {
            $d = "+";
        } else {
            $d = "-";
        }
        if ($minute_drop > 0) {
            $m = "+";
        } else {
开发者ID:mslokhat,项目名称:corebos,代码行数:31,代码来源:SaveEvent.php


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