本文整理匯總了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);
}