title: Attach behavior globally for all models in application config (without inheritance)
body: <p>I'm dealing with a problem for Yii2 on adding TimestampBehavior to run from main config. The reason is that i have to use it in frontend and backend on most of my models.</p>
  
  <p>To use it in a model is simple :</p>
  
  <pre><code>public function behaviors()
  {
      return [
          [
              'class' =&gt; TimestampBehavior::className(),
              'createdAtAttribute' =&gt; 'created_at',
              'updatedAtAttribute' =&gt; 'updated_at',
              'value' =&gt; function(){ return date('Y-m-d H:i:s'); } ,
          ],
      ];
  }
  </code></pre>
  
  <p>But if i'm trying to add the behavior in main.php nothing happens.
  I was thinking at :</p>
  
  <pre><code>'as timestamp'=&gt;[
      'class'=&gt; \yii\behaviors\TimestampBehavior::className(),
      'createdAtAttribute' =&gt; 'created_at',
      'updatedAtAttribute' =&gt; 'updated_at',
      'value' =&gt; function(){ return date('Y-m-d H:i:s'); } ,
  ],
  </code></pre>
  
  <p>But it doesn't work. Any ideas?</p>