当前位置: 首页>>代码示例>>PHP>>正文


PHP Users::getAllCount方法代码示例

本文整理汇总了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]);
 }
开发者ID:hanxiao84322,项目名称:coach_system,代码行数:7,代码来源:PagesController.php

示例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]);
 }
开发者ID:hanxiao84322,项目名称:coach_system,代码行数:16,代码来源:UserController.php

示例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]);
 }
开发者ID:hanxiao84322,项目名称:coach_system,代码行数:21,代码来源:HomeController.php


注:本文中的app\models\Users::getAllCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。