本文整理匯總了PHP中Self::user方法的典型用法代碼示例。如果您正苦於以下問題:PHP Self::user方法的具體用法?PHP Self::user怎麽用?PHP Self::user使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Self
的用法示例。
在下文中一共展示了Self::user方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: renderComment
public static function renderComment($id)
{
$comment = (object) Comment::getComment($id);
ob_start();
?>
<div class="ui minimal comments">
<div class="ui comment padded segment" id="<?php
echo $comment->id;
?>
" comment-id="<?php
echo $comment->id;
?>
">
<div class="content">
<div class="ui grid">
<div class="two wide column cmt_avatar">
<a href="/user/<?php
echo $comment->uid;
?>
/">
<img class="" src="<?php
echo $comment->img_path;
?>
">
</a>
</div>
<div class="fourteen wide column user-details">
<?php
echo Self::user($comment->uid, true, 'author');
?>
<div class="metadata">
<a class="time" href="question.php?id=<?php
echo $comment->id;
?>
">
<span id="commentDate">A few seconds ago</span>
</a>
</div>
<div class="text">
<h4><?php
echo $comment->content;
?>
</h4>
</div>
<div class="comment-points">
<a class="comment-vote-btn">
<i class="thumbs up circular icon"></i>
</a>
<span class="comment-votes-count"></span>
</div>
</div>
</div>
<div title="Actions" class="ui pointing dropdown" id="comment-actions">
<i class="ellipsis link big horizontal icon"></i>
<div class="menu">
<div class="item" id="edit">
<a class="edit">Edit</a>
</div>
<div class="item" id="del">
<a class="delete">Delete</a>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
$comment = ob_get_contents();
ob_end_clean();
return $comment;
}