Enable/Disable Controller or Method | Convert Traditional Module to Proper Yii Module

Hi, All,

How do I make the current YII project for B2B kind of development? In the starting time I was making it for just one company but now I want to sell the existing module if they pay for that.

For example,

I have communication module(not the module of Yii which can enable/disable from config).

> Protected/Controller/CommunicationController.php

> Protected/Models/Communication.php

> Protected/views/Communication/*.php

How do I do it? Is there any way to convert it in the PROPER YII MODULE. If so then please let me know.

Thank you in advance.

Sahil Patel

Hi Patel,

You may try to use subdomain kind of .htaccess routes for each client! so same instance of code can be used for all clients

Or

protected/modules/YourModule/YourModule.php

and

just copy and paste the files as you mentioned there





> Protected/Controller/CommunicationController.php

> Protected/Models/Communication.php

> Protected/views/Communication/*.php



then use yourdomian/module done!

You may refer the yii site : http://www.yiiframework.com/doc/guide/1.1/en/basics.module