本文整理汇总了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;
}