-
Notifications
You must be signed in to change notification settings - Fork 2
5.1 Structure
Taufik Firmansyah edited this page Jul 15, 2015
·
2 revisions
Every controller generated by code builder will have same structure and code
class ModuleController extends SB_Controller {
protected $layout = "layouts/main";
public $module = 'ModuleController';
public $per_page = '10';
public function __construct() {
parent::__construct();
$this->load->model('ModuleControllerModel');
$this->model = $this->ModuleControllerModel;
$this->info = $this->model->makeInfo( $this->module);
$this->access = $this->model->validAccess($this->info['id']);
$this->data = array_merge( $this->data, array(
'pageTitle' => $this->info['title'],
'pageNote' => $this->info['note'],
'pageModule' => 'ModuleController',
));
}
public function index()
{
/* Handle table grid , sort order ,
pagination and search proccess */
}
function show( $id = null)
{
/* Handle view detail*/
}
function add( $id = null)
{
/* Handle form add or edit */
}
function save()
{
/* Handle post form from add or edit */
}
public function destroy()
{
/* Handle multiple delete */
}
}
####Getting Started
- Installation
- Create Your First Module
- How to Edit Modules
- Module SQL
- Module Grid Table
- Module Form
- How to change template content element ( Frontend )
####Setting Application
- Manage Basic Info
- Manage Email Template
- Manage Social Login Security
- Manage Translation
- Manage Users and Groups
- Blast Emails
- Audit Trails / Log Activities
- Create New Page
- Working with PHP and MySQL on static page
- How to make multilanguage Page
- Display grid to frontend