本文整理汇总了PHP中common\models\User::Info方法的典型用法代码示例。如果您正苦于以下问题:PHP User::Info方法的具体用法?PHP User::Info怎么用?PHP User::Info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common\models\User
的用法示例。
在下文中一共展示了User::Info方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
<section>
<?php
echo yii\widgets\Breadcrumbs::widget(['options' => ['class' => 'breadcrumb mb0'], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
<?php
foreach ($model as $n) {
?>
<?php
$topicInfo = \common\models\Topic::Info($n->topic_id);
?>
<?php
$fromUserInfo = \common\models\User::Info($n->from_user_id);
?>
<?php
$toUserInfo = \common\models\User::Info($n->to_user_id);
?>
<?php
if ($n->type == 1) {
?>
<article class="notice">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td width="39" align="left" valign="top">
<a href="/member/<?php
echo $fromUserInfo['username'];
?>
"><img src="<?php
echo $fromUserInfo['avatar24'];
示例2: isset
<div class="col-md-9">
<section>
<?php
echo yii\widgets\Breadcrumbs::widget(['options' => ['class' => 'breadcrumb mb0'], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
<?php
foreach ($topic as $t) {
?>
<?php
$topicInfo = \common\models\Topic::Info($t['topic_id']);
?>
<?php
$userInfo = \common\models\User::Info($topicInfo['user_id']);
?>
<?php
$lastReplyUser = \common\models\User::Info($topicInfo['last_reply_user']);
?>
<article class="item">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody><tr>
<?php
if ($agent == 'is_iphone' || $agent == 'is_android') {
?>
<td width="24" valign="middle" align="center"><a href="/member/<?php
echo $userInfo['username'];
?>
"><img src="<?php
echo $userInfo['avatar24'];
?>
" class="img-rounded"></a></td>
<td width="10"></td>
示例3: foreach
<?php
echo $model->reply;
?>
回复 | 直到 <?php
echo Yii::$app->formatter->asRelativeTime($model->last_reply_time);
?>
</div>
<?php
$page = Yii::$app->request->get('page');
$floor = ((empty($page) ? 1 : $page) - 1) * Yii::$app->params['pageSize'] + 1;
?>
<?php
foreach ($replyList as $c) {
?>
<?php
$userInfo = \common\models\User::Info($c->user_id);
?>
<article class="topic-reply">
<div class="topic-reply-avatar pull-left">
<?php
if ($agent == 'is_iphone' || $agent == 'is_android') {
?>
<img class="img-rounded" src="<?php
echo $userInfo['avatar24'];
?>
">
<?php
} else {
?>
<img class="img-rounded" src="<?php
echo $userInfo['avatar48'];