Beispiel #1
0
 /**
  *
  * @param \yii\base\Application $app
  * @param array                 $config
  */
 protected function initialize($app, $config)
 {
     if ($app instanceof \yii\web\Application) {
         $app->attachBehaviors([PriceHook::className() => PriceHook::className(), StockHook::className() => StockHook::className()]);
         if (ArrayHelper::getValue($config, 'attach_user_behavior', true)) {
             $this->attachUserProperty($app->getUser());
         }
     }
 }