amnah\yii2\user\Module::getActions PHP 메소드

getActions() 공개 메소드

Get a list of actions for this module. Used for debugging/initial installations
public getActions ( )
    public function getActions()
    {
        return ["/{$this->id}" => "This 'actions' list. Appears only when <strong>YII_DEBUG</strong>=true, otherwise redirects to /login or /account", "/{$this->id}/admin" => "Admin CRUD", "/{$this->id}/login" => "Login page", "/{$this->id}/logout" => "Logout page", "/{$this->id}/register" => "Register page", "/{$this->id}/login-email" => "Login page v2 (login/register via email link)", "/{$this->id}/login-callback?token=zzzzz" => "Login page v2 callback (after user clicks link in email)", "/{$this->id}/auth/login?authclient=facebook" => "Register/login via social account", "/{$this->id}/auth/connect?authclient=facebook" => "Connect social account to currently logged in user", "/{$this->id}/account" => "User account page (email, username, password)", "/{$this->id}/profile" => "Profile page", "/{$this->id}/forgot" => "Forgot password page", "/{$this->id}/reset?token=zzzzz" => "Reset password page. Automatically generated from forgot password page", "/{$this->id}/resend" => "Resend email confirmation (for both activation and change of email)", "/{$this->id}/resend-change" => "Resend email change confirmation (quick link on the 'Account' page)", "/{$this->id}/cancel" => "Cancel email change confirmation (quick link on the 'Account' page)", "/{$this->id}/confirm?token=zzzzz" => "Confirm email address. Automatically generated upon registration/email change"];
    }

Usage Example

예제 #1
0
 /**
  * Display index - debug page, login page, or account page
  */
 public function actionIndex()
 {
     if (defined('YII_DEBUG') && YII_DEBUG) {
         $actions = $this->module->getActions();
         return $this->render('index', ["actions" => $actions]);
     } elseif (Yii::$app->user->isGuest) {
         return $this->redirect(["/user/login"]);
     } else {
         return $this->redirect(["/user/account"]);
     }
 }
All Usage Examples Of amnah\yii2\user\Module::getActions