New Module

Questions and answers about change of functions, design, hosting etc.

Moderators: Koduc, Xpycm

Forum rules
Pay attention! Forum is not a means for guaranteed support of clients and users. An answer as well as a quick answer is not supposed on the forum. We post messages as soon as possible.

The message limit on the forum is 3 messages per day.
If you want to say "thank you" then use the function "Give good reputation point", which is a green icon "plus" under the nickname of the person, who answered the message.

New Module

Postby Ashwini » 20 Oct 2015, 14:12

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
Ashwini
Passer
 
Posts: 44
Joined: 03 Aug 2015, 12:41
Reputation point: 0

Re: New Module

Postby Foton » 21 Oct 2015, 10:58

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
Foton
Web Developer
Web Developer
 
Posts: 117
Joined: 26 Jan 2012, 14:58
Reputation point: 1

Re: New Module

Postby Ashwini » 21 Oct 2015, 14:47

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)
Ashwini
Passer
 
Posts: 44
Joined: 03 Aug 2015, 12:41
Reputation point: 0

Re: New Module

Postby Foton » 21 Oct 2015, 15:00

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
Foton
Web Developer
Web Developer
 
Posts: 117
Joined: 26 Jan 2012, 14:58
Reputation point: 1


Return to Questions and help for changes

Who is online

Users browsing this forum: No registered users and 0 guests