public function actions()
 {
     return ['qrcode' => ['class' => QRcodeAction::className(), 'enableCache' => false, 'allowClientEclevel' => false, 'ecLevel' => QRcode::QR_ECLEVEL_H, 'defaultSize' => 4, 'allowClientSize' => false, 'defaultMargin' => 2, 'allowClientMargin' => false], 'qrcode' => ['class' => QRcodeAction::className(), 'enableCache' => true, 'allowClientEclevel' => true, 'ecLevel' => QRcode::QR_ECLEVEL_H, 'defaultSize' => 4, 'allowClientSize' => true, 'maxSize' => 10, 'defaultMargin' => 2, 'allowClientMargin' => true, 'maxMargin' => 10, 'outputDir' => '@webroot/upload/qrcode', 'onGetFilename' => function (QRcodeAction $data) {
         /* @var $data QRcodeAction */
         //dosomething
         return sha1($data->text) . '.png';
     }]];
 }
示例#2
0
 /**
  * @inheritdoc
  */
 public function actions()
 {
     return ['error' => ['class' => 'yii\\web\\ErrorAction'], 'captcha' => ['class' => 'yii\\captcha\\CaptchaAction', 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null], 'page' => ['class' => 'yii\\web\\ViewAction'], 'glide' => 'trntv\\glide\\actions\\GlideAction', 'qrcode' => ['class' => QRcodeAction::className(), 'enableCache' => false, 'allowClientEclevel' => false, 'ecLevel' => QRcode::QR_ECLEVEL_H, 'defaultSize' => 4, 'allowClientSize' => false, 'defaultMargin' => 2, 'allowClientMargin' => false], 'auth' => ['class' => 'yii\\authclient\\AuthAction', 'successCallback' => [$this, 'successCallback']]];
 }