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