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