本文整理汇总了PHP中Model_User::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_User::getList方法的具体用法?PHP Model_User::getList怎么用?PHP Model_User::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Model_User
的用法示例。
在下文中一共展示了Model_User::getList方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: listAction
/**
* 用户列表
*/
public function listAction()
{
$iPage = intval($this->getParam('page'));
$aWhere = array();
$aParam = $this->getParams();
if (!empty($aParam['iType'])) {
$aWhere['iType'] = $aParam['iType'];
}
if (!empty($aParam['iCoIndustry'])) {
$aWhere['iCoIndustry'] = $aParam['iCoIndustry'];
}
if (!empty($aParam['sEmail'])) {
$aWhere['sEmail LIKE'] = '%' . $aParam['sEmail'] . '%';
}
if (!empty($aParam['sMobile'])) {
$aWhere['sMobile LIKE'] = '%' . $aParam['sMobile'] . '%';
}
if (!empty($aParam['iStatus'])) {
$aWhere['iStatus'] = $aParam['iStatus'];
} else {
$aWhere['iStatus IN'] = '1,2';
}
$aList = Model_User::getList($aWhere, $iPage, $this->getParam('sOrder', ''));
$this->assign('aList', $aList);
$this->assign('aParam', $aParam);
$this->assign('aBusiness', Model_Domain::getPairDomain(Model_Domain::TYPE_CO_INDUSTRY));
//行业
}
示例2: action_index
public function action_index()
{
// creamos el layout o template principal
$template = View::factory('Template');
// Asignamos variables al template
$template->title = "Titulo de prueba";
$template->description = "Descripción de prueba";
// creamos un subtemplate (por ejemplo el template de la sección welcome)
$welcome = View::factory('welcome');
// asignamos variables a subtemplate
$welcome->title = "GCRM para Grado Superior";
// creamos modelo
$user = new Model_User();
// seteamos lista de usuarios
$welcome->users = $user->getList();
// cargamos subtemplate
$template->content = $welcome;
// mostramos el template
$this->response->body($template);
}
示例3: couriersAction
public function couriersAction()
{
$oRequest = App_Request::getInstance();
if ('admin' == App_Auth::getInstance()->getIdentity()->user_type) {
$oUserModel = new Model_User();
$oUserModel->setOption('type', 'courier');
$this->view->couriers = $oUserModel->getList();
} else {
$this->view->setView('admin/noperms.phtml');
}
}
示例4: function
<?php
require_once __DIR__ . '/../src/core.php';
CronRunner::run(__FILE__, function ($logger) {
$userCount = Model_User::getCount();
echo "User Count: " . Model_User::getCount() . PHP_EOL;
foreach (Model_User::getList() as $key) {
echo $key['name'] . PHP_EOL;
}
$mediaCount = [];
$distArr = [];
foreach (Media::getConstList() as $media) {
$distArr[$media] = [];
$mediaCount[$media] = Model_Media::getCount($media);
}
foreach (Media::getConstList() as $media) {
$localDist = Model_MixedUserMedia::getRatingDistribution($media);
foreach ($localDist->getGroupsKeys() as $key) {
if (!isset($distArr[$media][$key])) {
$distArr[$media][$key] = 0;
}
$distArr[$media][$key] += $localDist->getGroupSize($key);
}
}
$globalsCache = ['user-count' => $userCount, 'media-count' => $mediaCount, 'rating-dist' => $distArr];
TextHelper::putJson(Config::$globalsCachePath, $globalsCache);
});