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


PHP Location_Model::count方法代码示例

本文整理汇总了PHP中Location_Model::count方法的典型用法代码示例。如果您正苦于以下问题:PHP Location_Model::count方法的具体用法?PHP Location_Model::count怎么用?PHP Location_Model::count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Location_Model的用法示例。


在下文中一共展示了Location_Model::count方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

 function __construct()
 {
     $this->conf = array('path' => 'admin/schedules');
     parent::__construct(User_model::LEVEL_MANAGER);
     /* check how many locations do we have */
     $lm = new Location_Model();
     $location_count = $lm->count();
     $this->data['location_count'] = $location_count;
     /* check how many staff do we have */
     $um = new User_Model();
     $staff_count = $um->count_staff();
     $this->data['staff_count'] = $staff_count;
     $um = new User_Model();
     $staffs = $um->get()->all;
     $this->data['staffs'] = array();
     foreach ($staffs as $sta) {
         $this->data['staffs'][$sta->id] = $sta;
     }
     /* also get all shift templates */
     $shift_template_titles = array();
     $stm = new Shift_Template_Model();
     $stm->get();
     foreach ($stm->get() as $st) {
         //			$shift_template_titles[ $st->start . '-' . $st->end ] = $st->name;
     }
     $this->data['shift_template_titles'] = $shift_template_titles;
 }
开发者ID:RVRKC,项目名称:Hackathon_2015,代码行数:27,代码来源:schedules.php

示例2: array

 function __construct()
 {
     $this->conf = array('model' => 'Shift_model', 'path' => 'admin/shifts', 'entity' => 'shift', 'after_save' => 'shift');
     parent::__construct(User_model::LEVEL_MANAGER);
     /* check how many locations do we have */
     $lm = new Location_Model();
     $location_count = $lm->count();
     $this->data['location_count'] = $location_count;
 }
开发者ID:RVRKC,项目名称:Hackathon_2015,代码行数:9,代码来源:shifts.php

示例3: view_text

 public function view_text($skip = array())
 {
     $return = parent::view_text($skip);
     unset($return['start']);
     unset($return['end']);
     unset($return['status']);
     $return['date'][1] = $this->date_view($skip);
     /* optimize it sometime later */
     $lm = new Location_Model();
     $location_count = $lm->count();
     if ($location_count < 2) {
         unset($return['location']);
     }
     return $return;
 }
开发者ID:RVRKC,项目名称:Hackathon_2015,代码行数:15,代码来源:shift_model.php

示例4: array

 function __construct()
 {
     $this->conf = array('path' => 'wall');
     parent::__construct();
     $this->load->library('hc_time');
     /* check user level */
     $remote_integration = $this->remote_integration();
     if ($remote_integration) {
         $user_level = 0;
     } else {
         $user_level = $this->app_conf->get('wall_schedule_display');
     }
     if ($user_level) {
         $this->check_level($user_level);
     }
     /* check how many locations do we have */
     $lm = new Location_Model();
     $location_count = $lm->count();
     $this->data['location_count'] = $location_count;
 }
开发者ID:RVRKC,项目名称:Hackathon_2015,代码行数:20,代码来源:wall.php


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