Question

i'm trying to modify my gii... that's legal isn't it??

I'm trying to modify crud form generator so that the generator will generate form for current relational model..

i can do that if i modify the CActiveFormWidget, but it dont generate the code to the _form file...

so i need to modify the form by gii CRUD generator.

how do i access and create/instantiate the Model supplied by our input?

I could only get the Model class name.. What i need is the model it self..

EDITED :

Found it!

simply just :

$obj = new $this->modelClass();

at file _form.php

Yay!

Was it helpful?

Solution

other solution :

$obj = new $this->getModelClass();

btw, do you have tried yiibooster ? http://yiibooster.clevertech.biz/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top