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