本文整理汇总了PHP中app\models\Users::getAllCount方法的典型用法代码示例。如果您正苦于以下问题:PHP Users::getAllCount方法的具体用法?PHP Users::getAllCount怎么用?PHP Users::getAllCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Users
的用法示例。
在下文中一共展示了Users::getAllCount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionView
public function actionView()
{
$id = \Yii::$app->request->get('id');
$pageInfo = Pages::findOne($id);
$userCount = Users::getAllCount();
return $this->render('view', ['pageInfo' => $pageInfo, 'userCount' => $userCount]);
}
示例2: actionIndex
public function actionIndex()
{
$levelList = Level::getAll();
$districtList = ['' => '请选择区域', '朝阳区' => '朝阳区', '东城区' => '东城区', '海淀区' => '海淀区', '西城区' => '西城区', '昌平区' => '昌平区'];
$userCount = Users::getAllCount();
$coachA = Users::getCountUserByLevelId(2, 9);
$coachB = Users::getCountUserByLevelId(3, 9);
$coachC = Users::getCountUserByLevelId(4, 9);
$coachD = Users::getCountUserByLevelId(5, 9);
$coachE = Users::getCountUserByLevelId(6, 9);
$coachF = Users::getCountUserByLevelId(7, 9);
$newsList = News::getNewsByCategory(5, 12);
$data = ['levelList' => $levelList, 'districtList' => $districtList, 'userCount' => $userCount, 'coachA' => $coachA, 'coachB' => $coachB, 'coachC' => $coachC, 'coachD' => $coachD, 'coachE' => $coachE, 'coachF' => $coachF, 'newsList' => $newsList];
return $this->render('index', ['data' => $data]);
// return $this->render('build',['data' => $data]);
}
示例3: actionIndex
public function actionIndex()
{
$userCount = Users::getAllCount();
$oneNewsPic = News::getOnePicIndexNewsByCategory(2);
$newsA = News::getIndexNewsByCategory(2, 6);
$newsB = News::getIndexNewsByCategory(5, 12);
$newsC = News::getIndexNewsByCategory(7, 5);
$newsF = News::getOnePicIndexNewsByCategory(2);
$newsRegister = TrainUsers::getAllByCount(5);
$newContent = Pages::findOne(9);
if (!empty($newsRegister)) {
foreach ($newsRegister as $key => $val) {
$newsD[$key]['title'] = Users::getOneUserNameById($val['user_id']) . "报名" . Train::getOneTrainNameById($val['train_id']) . "已被录取";
$newsD[$key]['create_time'] = $val['create_time'];
$newsD[$key]['user_id'] = $val['user_id'];
}
}
$newsE = News::getIndexNewsByCategory(6, 5);
$data = ['userCount' => $userCount, 'oneNewsPic' => $oneNewsPic, 'newsA' => $newsA, 'newsB' => $newsB, 'newsC' => $newsC, 'newsD' => $newsD, 'newsE' => $newsE, 'newsF' => $newsF, 'newsRegister' => $newContent];
return $this->render('index', ['data' => $data]);
}