本文整理汇总了PHP中common\models\User::getTaUidShowName方法的典型用法代码示例。如果您正苦于以下问题:PHP User::getTaUidShowName方法的具体用法?PHP User::getTaUidShowName怎么用?PHP User::getTaUidShowName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common\models\User
的用法示例。
在下文中一共展示了User::getTaUidShowName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionPersonalPage
/**
* 他人主页,无权限
*/
public function actionPersonalPage($uid = 0)
{
$this->getView()->title = User::getTaUidShowName($uid) . '个人主页';
$this->layout = false;
$uid = intval($uid);
$uid = $uid > 0 ? $uid : 0;
// $this->render('my2');
$searchModel = new SurverySearch();
$queryParams = Yii::$app->request->queryParams;
$queryParams['SurverySearch']['uid'] = $uid;
$queryParams['SurverySearch']['is_publish'] = 1;
$query = $searchModel->query($queryParams);
$count = $query->count();
// echo $count;
// 分页
$pagination = new Pagination();
// 每页现实数量
$pagination->pageSize = $this->pageSize;
// 总数量
$pagination->totalCount = $count;
$old_page = $pagination->page;
$offset = $pagination->getOffset();
$limit = $pagination->getLimit();
$query->offset($offset);
$query->limit($limit);
$query->orderBy(['id' => SORT_DESC]);
$a_models = $query->all();
if (isset($_GET['ajax'])) {
if (isset($_GET[$pagination->pageParam]) && $pagination->pageCount < $_GET[$pagination->pageParam]) {
$a_models = [];
}
// echo $pagination->pageCount,'-',$pagination->page,'$old_page',$_GET[$pagination->pageParam] ;
// exit;
return $this->render('my-test-list', ['a_models' => $a_models, 'pagination' => $pagination]);
}
// isset($a_models[0]) ? null : $a_models=[];
return $this->render('my2', ['searchModel' => $searchModel, 'a_models' => $a_models, 'pagination' => $pagination, 'self' => 1, 'ajax_url' => Yii::$app->urlManager->createUrl(['my/personal-page', 'page' => '#page#', 'sort' => 1, 'self' => 1, 'ajax' => 1, 'uid' => $uid]), 'uid' => $uid]);
}
示例2:
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use common\z\ZCommonFun;
use common\models\Survey;
use common\z\ZCommonSessionFun;
use common\models\User;
/* @var $this yii\web\View */
/* @var $searchModel common\models\SurverySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
/* @var $row common\models\Survey */
$login_user_showNickname = User::getUidShowName(ZCommonSessionFun::get_user_id());
$ta_user_showNickname = User::getTaUidShowName($uid);
$User = User::findOne(ZCommonSessionFun::get_user_id());
$login_head_image = $User ? $User->getTaShowHead_image() : User::getDefaultHead_image();
$ta_User = User::findOne($uid);
$ta_head_image = $ta_User ? $ta_User->getTaShowHead_image() : User::getDefaultHead_image();
$this->title = $ta_user_showNickname . '与' . $login_user_showNickname;
$this->params['breadcrumbs'][] = $this->title;
echo $this->renderFile(__DIR__ . '/../layouts/head.php');
?>
<style>
.s_moreread{
margin-bottom: 220px;
position: relative;
}
</style>
<script type="text/javascript" src="./bag-test/js/jquery-2.1.0.min.js"></script>
<div id="main_body">
示例3:
}
?>
<link rel="stylesheet" href="./bag-test/css/common.css">
<script src="./js/concern.js">
</script>
<div class="user-info">
<table>
<tr>
<td class="td-1">
<?php
echo true ? '<img width="48" height="48" src="' . User::getTaUidShowHead_image($uid) . '"/>' : '<i class="fa fa-user user-image common-color"></i>';
?>
</td>
<td class="td-2">
<h3 class="common-color"><label style="color: #333;">昵称</label> <?php
echo User::getTaUidShowName($uid);
?>
</h3>
<div>
签名<sapn class="common-color">
<?php
echo User::getTaUidShowIntro($uid);
?>
</sapn>
</div>
</td>
<td class="td-3">
<div>
<?php