本文整理匯總了PHP中MY_Controller::get_template方法的典型用法代碼示例。如果您正苦於以下問題:PHP MY_Controller::get_template方法的具體用法?PHP MY_Controller::get_template怎麽用?PHP MY_Controller::get_template使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MY_Controller
的用法示例。
在下文中一共展示了MY_Controller::get_template方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: group
function group($group_id)
{
$modules = $this->menu_model->get_records();
foreach ($modules as $module) {
$user_right = $this->user_right_model->get_by(array('USER_GROUP_ID' => $group_id, 'MENU_ID' => $module->ID));
//echo $module->SLUG;
if ($user_right->num_rows() > 0) {
$user_permission = $user_right->row();
$user_roles = array('module_id' => $module->ID, 'module_name' => $module->NAMA_MENU, 'module_permission' => TRUE, 'create' => $user_permission->CREATE, 'delete' => $user_permission->DELETE, 'update' => $user_permission->UPDATE);
array_push($this->user_permissions, $user_roles);
} else {
$user_roles = array('module_id' => $module->ID, 'module_name' => $module->NAMA_MENU, 'module_permission' => FALSE, 'create' => 0, 'delete' => 0, 'update' => 0);
array_push($this->user_permissions, $user_roles);
}
}
$this->data['user_permissions'] = $this->user_permissions;
$this->data['main'] = 'user_roles/form';
$this->load->view(parent::get_template(), $this->data);
//print_r($this->user_permissions);
}