本文整理汇总了PHP中SugarFeed::get_list方法的典型用法代码示例。如果您正苦于以下问题:PHP SugarFeed::get_list方法的具体用法?PHP SugarFeed::get_list怎么用?PHP SugarFeed::get_list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SugarFeed
的用法示例。
在下文中一共展示了SugarFeed::get_list方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fetchReplies
function fetchReplies($data)
{
$seedBean = new SugarFeed();
$replies = $seedBean->get_list('date_entered', "related_module = 'SugarFeed' AND related_id = '" . $data['ID'] . "'");
if (count($replies['list']) < 1) {
return '';
}
$replyHTML = '<div class="clear"></div><blockquote>';
foreach ($replies['list'] as $reply) {
// Setup the delete link
$delete = '';
if (is_admin($GLOBALS['current_user']) || $data['CREATED_BY'] == $GLOBALS['current_user']->id) {
$delete = '<a id="sugarFieldDeleteLink' . $reply->id . '" href="#" onclick=\'SugarFeed.deleteFeed("' . $reply->id . '", "{this.id}"); return false;\'>' . $GLOBALS['app_strings']['LBL_DELETE_BUTTON_LABEL'] . '</a>';
}
$image_url = 'include/images/default_user_feed_picture.png';
if (isset($reply->created_by)) {
$user = loadBean('Users');
$user->retrieve($reply->created_by);
$image_url = 'index.php?entryPoint=download&id=' . $user->picture . '&type=SugarFieldImage&isTempFile=1&isProfile=1';
}
$replyHTML .= '<div style="float: left; margin-right: 3px; width: 50px; height: 50px;"><!--not_in_theme!--><img src="' . $image_url . '" style="max-width: 50px; max-height: 50px;"></div> ';
$replyHTML .= str_replace("{this.CREATED_BY}", get_assigned_user_name($reply->created_by), html_entity_decode($reply->name)) . '<br>';
$replyHTML .= '<div class="byLineBox"><span class="byLineLeft">' . $this->getTimeLapse($reply->date_entered) . ' </span><div class="byLineRight"> ' . $delete . '</div></div><div class="clear"></div>';
}
$replyHTML .= '</blockquote>';
return $replyHTML;
}