Example #1
4
 /**
  *
  * @param \yii\web\Application $app
  * @param array                $config
  */
 protected function initialize($app, $config)
 {
     if ($app instanceof \yii\web\Application) {
         if (ArrayHelper::getValue($config, 'attach_client_behavior', true)) {
             $app->attachBehavior(ClientBehavior::className(), ClientBehavior::className());
         }
         AppHelper::registerAccessHandler(models\Sales::className(), components\AccessHandler::className());
     }
 }
Example #2
3
 /**
  *
  * @param \yii\web\Application $app
  * @param array                $config
  */
 protected function initialize($app, $config)
 {
     if ($app instanceof \yii\web\Application) {
         $app->attachBehaviors([hooks\TransferNoticeHook::className() => hooks\TransferNoticeHook::className()]);
         AppHelper::registerAccessHandler(models\Transfer::className(), AccessHandler::className());
         AppHelper::registerAccessHandler(models\TransferNotice::className(), AccessHandler::className());
     }
 }
Example #3
0
 /**
  *
  * @param \yii\base\Application $app
  * @param array                 $config
  */
 protected function initialize($app, $config)
 {
     if ($app instanceof \yii\web\Application) {
         AppHelper::registerAccessHandler(models\Purchase::className(), components\AccessHandler::className());
     }
 }