<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Mymodules {
	private $id_menu = 0;
	
	function __construct()
	{
		
	}
	
	function set_id($id)
	{
		$this->id_menu = $id;
	}
	
	function get_menu()
	{
		$_this = &get_Instance();
		$_this->load->model('master/menu_model');
		
		$get_menu = $_this->menu_model->get($this->id_menu);
		
		return $get_menu;
	}
	
	function get_modules_list()
	{
		$_this = &get_Instance();
		$_this->load->model('master/operator_modules_model');
		$id_operator = $_this->session->userdata('idOperator');
		
		$_this->operator_modules_model->set_where(array('fidOperator'=>$id_operator,'fidMenu'=>$this->id_menu));
		$modules_list = $_this->operator_modules_model->get_list();
		
		return $modules_list->result_array();
	}
}