Welcome Guest, Not a member yet? Register   Sign In
How to implement CRUD in module (HMVC) ?
#1

[eluser]web_developer[/eluser]
Hello,

I want to develop one CMS for my client, and for that I have to prepare lots of modules with CRUD.

I have download the HMVC file and set it in library. But now how can I used that for add/edit/delete for particular module?

let's take one example

Code:
// MAIN PARENT CLASS //
class Home_page extends controller
{
  function Home_page()
  {
    parent::controller
  }

  function index()
  {
      $this->load->module('navigation');
  }
}

// MY MODULE CLASS //
//navigation/controller
//navigation/model
//navigation/view

ckass Navigation extends Controller
{
    function Navigation()
    {
       parent::controller;
      
       $this->load->model('navigationModel');
    }
    
    function add_navigation()
    {
       $this->navigationModel->add();
    }

    function remove_navigation()
    {
       $this->navigationModel->remove();
    }

    function edit_navigation()
    {
       $this->navigationModel->edit();
    }

    function show_navigation()
    {
       $this->navigationModel->show();
    }
}

So now how to set link for Add/edit/delete module? I means, I would like to load my module from any parent controller, then it should work.

I am not getting the proper way.. How to set link in view for Add/Edit/Delete and How can I access module in any parent class?

I hope you understand what I mean to say? Is there any tutorial or video for Module, which are using CRUD ? Can anyone help me in this?


Messages In This Thread
How to implement CRUD in module (HMVC) ? - by El Forum - 05-25-2010, 10:56 PM
How to implement CRUD in module (HMVC) ? - by El Forum - 05-26-2010, 10:25 AM
How to implement CRUD in module (HMVC) ? - by El Forum - 05-26-2010, 10:29 AM
How to implement CRUD in module (HMVC) ? - by El Forum - 05-26-2010, 10:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB