當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CustomProperties::getCustomPropertyIdsByObjectType方法代碼示例

本文整理匯總了PHP中CustomProperties::getCustomPropertyIdsByObjectType方法的典型用法代碼示例。如果您正苦於以下問題:PHP CustomProperties::getCustomPropertyIdsByObjectType方法的具體用法?PHP CustomProperties::getCustomPropertyIdsByObjectType怎麽用?PHP CustomProperties::getCustomPropertyIdsByObjectType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CustomProperties的用法示例。


在下文中一共展示了CustomProperties::getCustomPropertyIdsByObjectType方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: total_task_times_p

 function total_task_times_p()
 {
     //set params from config options
     $report_data['date_type'] = user_config_option('timeReportDate');
     $now_date = DateTimeValueLib::now();
     if (strtotime(user_config_option('timeReportDateStart'))) {
         //this return null if date is 0000-00-00 00:00:00
         $report_data['start_value'] = user_config_option('timeReportDateStart');
     } else {
         $dateStart = format_date($now_date, DATE_MYSQL, 0);
         //today
         $report_data['start_value'] = $dateStart;
     }
     if (strtotime(user_config_option('timeReportDateEnd'))) {
         //this return null if date is 0000-00-00 00:00:00
         $report_data['end_value'] = user_config_option('timeReportDateEnd');
     } else {
         $dateEnd = format_date($now_date, DATE_MYSQL, 0);
         //today
         $report_data['end_value'] = $dateEnd;
     }
     $report_data['user'] = user_config_option('timeReportPerson');
     $report_data['timeslot_type'] = user_config_option('timeReportTimeslotType');
     $report_data['show_estimated_time'] = user_config_option('timeReportShowEstimatedTime');
     $group = explode(',', user_config_option('timeReportGroupBy'));
     $report_data['group_by_1'] = array_var($group, 0);
     $report_data['group_by_2'] = array_var($group, 1);
     $report_data['group_by_3'] = array_var($group, 2);
     $altGroup = explode(',', user_config_option('timeReportAltGroupBy'));
     $report_data['alt_group_by_1'] = array_var($altGroup, 0);
     $report_data['alt_group_by_2'] = array_var($altGroup, 1);
     $report_data['alt_group_by_3'] = array_var($altGroup, 2);
     $report_data['show_billing'] = user_config_option('timeReportShowBilling');
     $cp_ids = CustomProperties::getCustomPropertyIdsByObjectType(ProjectTasks::instance()->getObjectTypeId());
     tpl_assign('has_custom_properties', count($cp_ids) > 0);
     $sel_member_ids = active_context_members(false);
     if (count($sel_member_ids) == 0) {
         $users = Contacts::getAllUsers();
     } else {
         $users = allowed_users_in_context(Timeslots::instance()->getObjectTypeId(), active_context());
     }
     $_SESSION['total_task_times_report_data'] = $report_data;
     tpl_assign('report_data', $report_data);
     tpl_assign('users', $users);
     tpl_assign('has_billing', BillingCategories::count() > 0);
 }
開發者ID:abhinay100,項目名稱:feng_app,代碼行數:46,代碼來源:ReportingController.class.php


注:本文中的CustomProperties::getCustomPropertyIdsByObjectType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。