當前位置: 首頁>>代碼示例>>PHP>>正文


PHP User::Info方法代碼示例

本文整理匯總了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'];
開發者ID:advance100,項目名稱:yunjianyi,代碼行數:31,代碼來源:notice.php

示例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>
開發者ID:advance100,項目名稱:yunjianyi,代碼行數:31,代碼來源:search.php

示例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'];
開發者ID:npk,項目名稱:v2sex,代碼行數:31,代碼來源:view.php


注:本文中的common\models\User::Info方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。