当前位置: 首页>>代码示例>>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;未经允许,请勿转载。