I've tried to use Gii and got an errors. So I've wrote a tiny step-by-step instruction how to fix generated content. Thats not a complete fix, but could be helpfull for a start.
I think Gii should be extended to make it automatically.
For example i've generated Model YiiLog & CRUD for it.
I've recieved an error:
include(Controller.php): failed to open stream: No such file or directory
In our generated controller class we need to change:
class YiiLogController extends Controller
to:
class YiiLogController extends EController
Then I've recieved an error:
Declaration of YiiLogController::loadModel() should be compatible with EController::loadModel($class, $id, $criteria = Array, $exceptionOnNull = true)
In our generated controller class we need to remove loadModel & performAjaxValidation functions, because they are implemented in EController already.
After that we need to rewrite each call of loadModel function in our controller.
Find every:
Change to:
$this->loadModel('YiiLog',$id)
Then I've recieved and error:
Property "YiiLogController.menu" is not defined.
Change ./common/extensions/components/EController.php file.
find:
add below:
I've tried to use Gii and got an errors. So I've wrote a tiny step-by-step instruction how to fix generated content. Thats not a complete fix, but could be helpfull for a start.
I think Gii should be extended to make it automatically.
For example i've generated Model YiiLog & CRUD for it.
I've recieved an error:
In our generated controller class we need to change:
to:
Then I've recieved an error:
In our generated controller class we need to remove
loadModel&performAjaxValidationfunctions, because they are implemented in EController already.After that we need to rewrite each call of loadModel function in our controller.
Find every:
Change to:
Then I've recieved and error:
Change
./common/extensions/components/EController.phpfile.find:
add below: