本文整理汇总了PHP中UserHelper::getUserOrg方法的典型用法代码示例。如果您正苦于以下问题:PHP UserHelper::getUserOrg方法的具体用法?PHP UserHelper::getUserOrg怎么用?PHP UserHelper::getUserOrg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserHelper
的用法示例。
在下文中一共展示了UserHelper::getUserOrg方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$view = '<a class="btn-view" href="' . $link . '">进行中...</a>';
} else {
$plan = '';
$view = '<a class="btn-expired" href="' . $link . '">已经结束</a>';
}
if (isset($share->slide) && !empty($share->slide)) {
$slide = '<a class="tag-slide" href="' . $link . '">PDF</a>';
} else {
$slide = '';
}
if (empty($share->description)) {
$desc = '讲师太懒还没有写内容简介...';
} else {
$desc = Core::safeSubstr(htmlspecialchars($share->description), 0, 80) . '...';
}
$lecturerOrg = UserHelper::getUserOrg($lecturer);
$avatar = '<img style="width:24px;border-radius:12px; vertical-align:-6px; margin:0 8px 0 0;" src="' . NewBambooHelper::getAvatarByLogin($lecturer->login) . '" />';
$tags = TagsController::getTagsForShare($share->id);
$tagHtml = '';
if (count($tags) > 0) {
$tagHtml = '<ul>';
foreach ($tags as $tag) {
$tagHtml .= '<li><a href="/share/tag/' . $tag->id . '">' . htmlspecialchars($tag->name) . '</a></li>';
}
$tagHtml .= '</ul>';
}
echo '
<article class="item-card">
<header>
<p class="exchange-guest"><strong>' . $lecturer->name . '</strong> @' . $lecturerOrg . '</p>
<h3><a href="/share/default/' . $share->id . '">' . htmlspecialchars($share->title) . '</a></h3>
示例2: MitUserModel
$oper = new MitUserModel($rel->operid);
$org = UserHelper::getUserOrg($user);
echo '
<li>
<span class="user"><a href="/user/default/' . $user->login . '"><img src="' . NewBambooHelper::getAvatarByLogin($user->login) . '">' . $user->name . '</a></span>
<span class="org">' . $org . '</span>
<span class="oper">' . $oper->name . '邀请于' . date('Y-m-d H:i', $rel->modtime) . '</span>
</li>
';
}
echo '</ul>';
echo '<h3>已报名(' . count($applyList) . ')</h3>';
echo '<ul>';
foreach ($applyList as $res) {
$user = new MitUserModel($res->userid);
$org = UserHelper::getUserOrg($user);
echo '
<li>
<span class="user"><a href="/user/default/' . $user->id . '"><img src="' . NewBambooHelper::getAvatarByLogin($user->login) . '">' . $user->name . '</a></span>
<span class="org">' . $org . '</span>
<span class="oper">' . date('Y-m-d H:i', $res->modtime) . '报名</span>
</li>
';
}
echo '</ul>';
?>
</div>
</div>
</div>
</div>
<script>