title: How to create a Yii module/component/extension for multiple module usage?
body: <p>I'm creating a YII application containing multiple modules. Each module contains a <code>FrontendController</code> and a <code>BackendController</code>.</p>
  
  <p>Now I have functionality shared by all of these modules, like a customizable Facebook share button. The share button should have a text and a title which can be edited inside the backend. And then is displayed in the module frontend.</p>
  
  <p>The best scenario would be adding two lines to each controller, resulting in another settings tab in the backend and rendering a share button inside the frontend.</p>
  
  <p>I've looked into PHP <a href="http://php.net/manual/en/language.oop5.traits.php" rel="nofollow">Traits</a> which could add the functionality to the controllers, but I still need extra models, etc.</p>