There is a model(Message) located in message module. How can I create crud operations for this model outside of the module. Simply I want to create a crud operation (not in module), but my model is located in message module model directory.
First possible solution is copying Message model to Yii base model directory. Is there any other systematic way to create my crud operations?
Asked
Active
Viewed 3,333 times
2
2 Answers
5
You can do it with gii. Provide application.modules.message.models.Message
in the Model class field of Crud Generator page.

Preetam
- 618
- 6
- 13
-
Thanks @schmunk, It seems you are a Yii master! Your answers are really helpful. – hpaknia Apr 26 '13 at 10:46
-
Thanks. Exactly what I was looking for. – Ram Dec 10 '15 at 06:45
1
Create a module via Module Generator.
Register your module name in the config main.php (modules array)
Create a model via Model Generator. Fill in the fields and put this in Model Path : application.modules.[module-name].models
Create crud via Crud Generator. Fill in the fields and put this in Model Class: [module-name].models.[model-name]

Mahesh ML
- 542
- 9
- 16