Customize CRUD operation

Hi,

I’m trying to customize the CRUD operation, after the model from here:

docs.dhtmlx.com/doku.php?id=dhtm … erver-side

So I have in php file:

$connector = new GridConnector($mysql_db);
$connector->configure(“acl_role”, “id”, “name”);
$connector->useModel(new roleModel());
$connector->render();

In roleModel for now I have only:

class roleModel
{
//function get($request)
//{
//}
function update($action)
{
//call $action->success(); or $action->invalid(); to mark operation as completed or invalid
}
function insert($action)
{
//call $action->success(); or $action->invalid(); to mark operation as completed or invalid
}
function delete($action)
{
//call $action->success(); or $action->invalid(); to mark operation as completed or invalid
}
}

I commented roleModel->get() method because in the documentation said that if we skip one method, the connector will try to generate its own version of logic.

  1. What I have to write in get() method, so connector to generate its own version of logic?

  2. Can you give me an example of a personalize get() method, please?

Can you please provide any kind of hint for this problem?

I really need to customize all CRUD operation.

(a)
You need not write anything, just do not define get method on model class. But in same time you need to provide valid render command, not empty render as in your code, but full render_table or render_sql - which will be used for all auto-operations.

(b)
get method must return an array of data, which it can retrieve by any custom logic

[code]public function get($request){
//you can ignore request object, it necessary only for complex behaviors

 $data = array();
 $data[] = array("id" => 1, "col1" => "data 1");  //row 1
 $data[] = array("id" => 2, "col1" => "data 2");  //row 2
 
 return $data;

}[/code]

i wan to write CURD operation in gantt charts using java. is it possible? Can you please guide me how can i do it?