本文整理汇总了PHP中District::getTotalNumber方法的典型用法代码示例。如果您正苦于以下问题:PHP District::getTotalNumber方法的具体用法?PHP District::getTotalNumber怎么用?PHP District::getTotalNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类District
的用法示例。
在下文中一共展示了District::getTotalNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view_list
public function view_list($offset = 0)
{
$items_per_page = 20;
$number_of_districts = District::getTotalNumber();
$districts = District::getPagedDistricts($offset, $items_per_page);
if ($number_of_districts > $items_per_page) {
$config['base_url'] = base_url() . "district_management/view_list/";
$config['total_rows'] = $number_of_districts;
$config['per_page'] = $items_per_page;
$config['uri_segment'] = 3;
$config['num_links'] = 5;
$this->pagination->initialize($config);
$data['pagination'] = $this->pagination->create_links();
}
$data['districts'] = $districts;
$data['title'] = "District Management::All My Districts";
$data['module_view'] = "view_districts_view";
$this->base_params($data);
}