本文整理汇总了PHP中SugarBean::get_meeting_users方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarBean::get_meeting_users方法的具体用法?PHP SugarBean::get_meeting_users怎么用?PHP SugarBean::get_meeting_users使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarBean
的用法示例。
在下文中一共展示了SugarBean::get_meeting_users方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getBeanDataArray
/**
* Get array that will be sent back to ajax frontend
* @param SugarBean $bean
* @return array
*/
static function getBeanDataArray(SugarBean $bean)
{
if (isset($bean->parent_name) && isset($_REQUEST['parent_name'])) {
$bean->parent_name = $_REQUEST['parent_name'];
}
$users = array();
if ($bean->object_name == 'Call') {
$users = $bean->get_call_users();
} else {
if ($bean->object_name == 'Meeting') {
$users = $bean->get_meeting_users();
}
}
$user_ids = array();
foreach ($users as $u) {
$user_ids[] = $u->id;
}
$field_list = CalendarUtils::get_fields();
$field_arr = array();
foreach ($field_list[$bean->module_dir] as $field) {
if ($field == 'related_to') {
$focus = BeanFactory::getBean($bean->parent_type, $bean->parent_id);
$field_arr[$field] = $focus->name;
} else {
$field_arr[$field] = $bean->{$field};
}
}
$date_field = "date_start";
if ($bean->object_name == 'Task') {
$date_field = "date_due";
}
$arr = array('access' => 'yes', 'type' => strtolower($bean->object_name), 'module_name' => $bean->module_dir, 'user_id' => $GLOBALS['current_user']->id, 'detail' => 1, 'edit' => 1, 'name' => $bean->name, 'record' => $bean->id, 'users' => $user_ids);
if (!empty($bean->repeat_parent_id)) {
$arr['repeat_parent_id'] = $bean->repeat_parent_id;
}
$arr = array_merge($arr, $field_arr);
$arr = array_merge($arr, CalendarUtils::get_time_data($bean));
return $arr;
}