Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

How Do I Add An Extension To My Module?

$
0
0
As the title indicates, I'm trying to add an extension to a module that I am developing for an office intranet site. I am currently adding the YiiBooster extension which is a form of the boostrap extension. I have a few more extensions that I would like to add once I am successful at this one.

I have downloaded and saved the extension under /protected/modules/myModule/extenstions/bootstrap. In the myModule.php file, I've added the following code:
Yii::setPathOfAlias('bootstrap', dir(__FILE__).'extensions/bootstrap');
$this->configure(array(
   'components'=>array(
      'bootstrap'=>array(
         'class'=>'ext.bootstrap.components.Bootstrap',
         'responsiveCss'=>true,
      ),
   ),
));
$this->preloadComponents();

It seems the only line of code that is doing anything is the setPathOfAlias. I can comment out the configure line and the preloadComponents() line and nothing changes on my site. Maybe I need to move this code to somewhere else?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>