From f7e29678a7319e8416023e2d2ec6ad78f7a4561b Mon Sep 17 00:00:00 2001 From: RomanBush <42352691+RomanBush@users.noreply.github.com> Date: Thu, 20 May 2021 22:26:41 +0300 Subject: [PATCH] Update security-authorization.md (#18667) change deprecated function to actual --- docs/guide/security-authorization.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guide/security-authorization.md b/docs/guide/security-authorization.md index aee2570f2e..6e69e17a91 100644 --- a/docs/guide/security-authorization.md +++ b/docs/guide/security-authorization.md @@ -25,7 +25,7 @@ class SiteController extends Controller { return [ 'access' => [ - 'class' => AccessControl::className(), + 'class' => AccessControl::class, 'only' => ['login', 'logout', 'signup'], 'rules' => [ [ @@ -70,7 +70,7 @@ You may customize this behavior by configuring the [[yii\filters\AccessControl:: ```php [ - 'class' => AccessControl::className(), + 'class' => AccessControl::class, ... 'denyCallback' => function ($rule, $action) { throw new \Exception('You are not allowed to access this page'); @@ -129,7 +129,7 @@ class SiteController extends Controller { return [ 'access' => [ - 'class' => AccessControl::className(), + 'class' => AccessControl::class, 'only' => ['special-callback'], 'rules' => [ [ @@ -538,7 +538,7 @@ public function behaviors() { return [ 'access' => [ - 'class' => AccessControl::className(), + 'class' => AccessControl::class, 'rules' => [ [ 'allow' => true,