Page 1 of 1

New Module

PostPosted: 20 Oct 2015, 14:12
by Ashwini
i am creating new mysql table ,name as agentsite with the help of "gii" generate the controllers , modules and views files.. which is automatically created in.. following directory
1) protected/models/--Agentsite.php (Module)
2) protected/views/agentsite/_form , _search, _view, admin, create, index, upadte, view .php files
3)Protected/controllers/AgentsiteController.php

.. Now i want to give link of "Agent" at admin site .. my link is "http://localhost/index.php?r=agentsite/admin" .. this page is working properly , but it not show in original format of admin..

Please tell me , how to configure , newly created modules in our "Open real estate " web

Re: New Module

PostPosted: 21 Oct 2015, 10:58
by Foton
Try to change class header in AgentsiteController to
Code: Select all
class AgentsiteController extends ModuleAdminController

Also carefully review the structure and location of the files in our product, they are different from the standard

Re: New Module

PostPosted: 21 Oct 2015, 14:47
by Ashwini
This error is occured, after change the "class AgentsiteController extends ModuleAdminController"

Error 500
Declaration of AgentsiteController::loadModel() should be compatible with ModuleAdminController::loadModel($id = NULL)

Re: New Module

PostPosted: 21 Oct 2015, 15:00
by Foton
It means thah your loadModel() function in AgentsiteController are not compartible with ModuleAdminController
Try to change this function declaration in AgentsiteController to public function loadModel($id = NULL) or simple remove this function