Hi,
looking at the documentation page for the set_model function I'm not sure how to use it.
In the example I see that inside the model you define a function named [font=monospace]"[/font]get_relation_n_n_unselected_array". I don't get how to use this function. It doesn't seem that you calling it anywhere in the controller. Instead in the controller there is this: [color=#000088]$crud[/color][color=#339933]->[/color][color=#004000]set_relation_n_n[/color][color=#009900]([/color][color=#0000ff]'actors'[/color][color=#339933],[/color] [color=#0000ff]'film_actor'[/color][color=#339933],[/color] [color=#0000ff]'actor'[/color][color=#339933],[/color] [color=#0000ff]'film_id'[/color][color=#339933],[/color] [color=#0000ff]'actor_id'[/color][color=#339933],[/color] [color=#0000ff]'fullname'[/color][color=#339933],[/color][color=#0000ff]'priority'[/color][color=#009900])[/color][color=#339933];[/color]
It's just an error or are you using some specific names?
Can you give some more explanations about this?
Thanks
Doubts on set_model
Started by Qarlo, 14 February 2012 - 15:55 PM
- Single Page
Posted 14 February 2012 - 15:55 PM
Posted 16 February 2012 - 22:16 PM
The set_model is called from the core library. You can also see another example of using set_model at: /topic/90-how-to-create-an-extension-for-grocery-crud-real-example-included/ . The set_model is good to use it when you have enough experience with grocery CRUD and you really need something custom that grocery CRUD doesn't have.