本文整理汇总了PHP中dbeav_model::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP dbeav_model::getList方法的具体用法?PHP dbeav_model::getList怎么用?PHP dbeav_model::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dbeav_model
的用法示例。
在下文中一共展示了dbeav_model::getList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getList
/**
* 重写getList方法
* @param string column
* @param array filter
* @param int offset
* @param int limit
* @param string order by
*/
public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
{
$recycle_permission = $filter['recycle_permission'];
unset($filter['recycle_permission']);
if ($recycle_permission && is_array($recycle_permission)) {
if (strpos($cols, 'permission') === false) {
$cols .= ',permission ';
}
}
$ids = array();
$res = app::get('base')->model('apps')->getList('app_id', array('status' => 'active'));
foreach ($res as $res_v) {
$ids[] = $res_v['app_id'];
}
$filter['app_key|in'] = $ids;
$data = parent::getList($cols, $filter, $offset, $limit, $orderType);
if ($recycle_permission && is_array($recycle_permission)) {
$aTmp = array();
$menus = $this->app->model('menus');
$recycle = $this->app->model('recycle');
foreach ($data as $k => $v) {
$per_row = $menus->getList('menu_id', array('menu_type' => 'permission', 'permission' => $v['permission']));
if (!$per_row || in_array($v['permission'], $recycle_permission)) {
$aTmp[$k] = $v;
}
}
return $aTmp;
} else {
return $data;
}
}
示例2: getSpecialList
/**
* 获得专辑列表
*
* @param array $param 参数
* @return array
*/
function getSpecialList($param = array())
{
$list = array();
$filter = $param['filter'];
$fields = $param['fields'] ? $param['fields'] : '*';
$limit = intval($param['limit']);
$limit = $limit > 0 ? $limit : 20;
$page = intval($param['page']);
$page = $page > 0 ? $page : 1;
$offset = ($page - 1) * $limit;
$orderby = $param['orderby'] ? $param['orderby'] : 'addtime DESC';
$count = parent::count($filter);
if ($count) {
$info = parent::getList($fields, $filter, $offset, $limit, $orderby);
}
$platform = $param['platform'] ? $param['platform'] : 'wap';
// 获得商品列表
if ($info) {
$list['total_results'] = $count;
foreach ($info as $k => $v) {
$param = array('special_id' => $v['special_id'], 'limit' => 4, 'platform' => $platform);
$list['list'][] = $this->getSpecialInfo($param, 2);
}
}
return $list;
}
示例3: getList
public function getList($cols = '*', $filter = 'null', $offset = 0, $limit = -1, $orderby = null)
{
$list = parent::getList($cols, $filter, $offset, $limit, $orderby);
foreach ($list as $key => $row) {
$list[$key]['content'] = base64_decode($row['content']);
}
return $list;
}
示例4: getList
/**
* getList
* @params string -
* @params array -
* @params ƫʼֵ
* @params ƫλֵ
* @params
*/
public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderby = null)
{
if ($filter) {
return parent::getList($cols, $filter, $offset, $limit, $orderby);
} else {
return parent::getList($cols, null, $offset, $limit, $orderby);
}
}
示例5: save
function save(&$item)
{
$list = parent::getList('*', array('tag_name' => $item['tag_name'], 'tag_type' => $item['tag_type'], 'app_id' => $item['app_id']));
if ($list && count($list) > 0) {
$item['tag_id'] = $list[0]['tag_id'];
}
parent::save($item);
}
示例6: getList
public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
{
$this->monitor_txt();
$list = parent::getList($cols, $filter, $offset, $limit, $orderType);
// foreach ($list as $key => &$value) {
// $value['flag'] = $this->app->res_url.'/misc/'.strtolower($value['ct_abbreviation']).'.png';
// }
return $list;
}
示例7: getList
public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
{
$user_id = $filter['user_id'];
unset($filter['user_id']);
if (!$filter['user_ident']) {
$filter['user_ident'] = $this->getUserIdentMd5($user_id);
}
return parent::getList($cols, $filter, $offset, $limit, $orderType);
}
示例8: getList
/**
* 重写getList方法
* @param string column
* @param array filter
* @param int offset
* @param int limit
* @param string order by
*/
public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
{
$addrs_member = parent::getList($cols, $filter, $offset, $limit, $orderType);
$info_object = kernel::service('sensitive_information');
if (is_object($info_object)) {
$info_object->opinfo($addrs_member, 'b2c_mdl_member_addrs', __FUNCTION__);
}
return $addrs_member;
}
示例9: save
function save(&$item, $mustUpdate = null, $mustInsert = false)
{
$list = parent::getList('*', array('tag_id' => $item['tag']['tag_id'], 'rel_id' => $item['rel_id']));
if ($list && count($list) > 0) {
$item = $list[0];
} else {
parent::save($item);
}
}
示例10: save
function save(&$item)
{
$list = parent::getList('*', array('tag_id' => $item['tag']['tag_id'], 'rel_id' => $item['rel_id']));
if ($list && count($list) > 0) {
$item = $list[0];
} else {
parent::save($item);
}
}
示例11: getList
/**
* 重写getlist方法,重写排序方式
*/
public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
{
if ($orderType) {
$orderType .= ',ordernum ASC';
} else {
$orderType = 'ordernum ASC';
}
return parent::getList($cols, $filter, $offset, $limit, $orderType);
}
示例12: getList
function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
{
$row = parent::getList($cols, $filter, $offset, $limit, $orderType);
foreach ($row as $key => $val) {
$val['type_name'] = $this->get_type_name($val['type_id']);
$aData[] = $val;
}
return $aData;
}
示例13: getList
public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
{
$arr_list = parent::getList($cols, $filter, $offset, $limit, $orderType);
if ($arr_list) {
foreach ($arr_list as $key => $arr) {
$arr_list[$key]['area_id'] = $this->_area_list[$arr['area_id']];
$arr_list[$key]['gift_id'] = $this->_gift_list[$arr['gift_id']];
}
}
return $arr_list;
}
示例14: getList
/**
* 重写getList方法
*/
public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
{
$arr_list = parent::getList($cols, $filter, $offset, $limit, $orderType);
$obj_extends_order_service = kernel::serviceList('b2c.api_reship_extends_actions');
if ($obj_extends_order_service) {
foreach ($obj_extends_order_service as $obj) {
$obj->extend_item_list($arr_list);
}
}
return $arr_list;
}
示例15: getList
public function getList($cols = '*', $filter = array(), $offset = 0, $limit = -1, $orderType = null)
{
$arr_themes_tmpl = parent::getList($cols, $filter, $offset, $limit, $orderType);
$obj_themes_file = app::get('site')->model('themes_file');
foreach ($arr_themes_tmpl as $key => $arr) {
if ($arr['rel_file_id']) {
$themes_file_content = $obj_themes_file->getList('theme,content', array('id' => $arr['rel_file_id']));
$arr_themes_tmpl[$key]['content'] = $themes_file_content['0']['content'];
$arr_themes_tmpl[$key]['version'] = $themes_file_content['0']['version'];
}
}
return $arr_themes_tmpl;
}