문제

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!

도움이 되었습니까?

해결책

other solution :

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top