本文整理汇总了PHP中Division::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Division::get方法的具体用法?PHP Division::get怎么用?PHP Division::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Division
的用法示例。
在下文中一共展示了Division::get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: divisions
function divisions($office_id = '')
{
$o = new Office_m();
$o->get_by_office_id($office_id);
$data['page_name'] = '<b>Divisions of "' . $o->office_name . '"</b>';
$data['msg'] = '';
$this->load->library('pagination');
$divisions = new Division();
$config['base_url'] = base_url() . 'training_manage/course';
$config['total_rows'] = $divisions->count();
$config['per_page'] = '15';
$config['full_tag_open'] = '<p>';
$config['full_tag_close'] = '</p>';
$this->pagination->initialize($config);
// How many related records we want to limit ourselves to
$limit = $config['per_page'];
// Set the offset for our paging
$offset = $this->uri->segment(4);
$divisions->where('office_id', $office_id);
$divisions->order_by('name');
$data['rows'] = $divisions->get($limit, $offset);
$data['office_id'] = $office_id;
$data['page'] = $this->uri->segment(3);
$data['main_content'] = 'divisions';
return View::make('includes/template', $data);
}