PHP 클래스 amnah\yii2\user\Module

저자: amnah ([email protected])
상속: extends yii\base\Module, implements yii\base\BootstrapInterface
파일 보기 프로젝트 열기: amnah/yii2-user 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$alias Alias for module
$emailChangeConfirmation If true, users will have to confirm their email address after changing it on the account page
$emailConfirmation If true, users will have to confirm their email address after registering (= email activation)
$emailViewPath Email view path
$loginDuration Login duration
$loginEmail If true, users can log in using their email
$loginExpireTime Login via email token expiration (passed to strtotime())
$loginRedirect Url to redirect to after logging in. If null, will redirect to home page. Note that AccessControl takes precedence over this (see [[yii\web\User::loginRequired()]])
$loginUsername If true, users can log in using their username
$logoutRedirect Url to redirect to after logging out. If null, will redirect to home page
$modelClasses Model classes, e.g., ["User" => "amnah\yii2\user\models\User"] Usage: $user = Yii::$app->getModule("user")->model("User", $config); (equivalent to) $user = new \amnah\yii2\user\models\User($config); The model classes here will be merged with/override the [[getDefaultModelClasses()|default ones]]
$requireEmail If true, users are required to enter an email
$requireUsername If true, users are required to enter a username
$resetExpireTime Reset password token expiration (passed to strtotime())
$useEmail If true, users can enter an email. This is automatically set to true if $requireEmail = true
$useUsername If true, users can enter a username. This is automatically set to true if $requireUsername = true

보호된 프로퍼티들

프로퍼티 타입 설명
$version Module version

공개 메소드들

메소드 설명
createController ( $route ) Modify createController() to handle routes in the default controller
getActions ( ) Get a list of actions for this module. Used for debugging/initial installations
getVersion ( ) : string Get module version
init ( )
model ( string $name, array $config = [] ) : ActiveRecord Get object instance of model

보호된 메소드들

메소드 설명
checkModuleProperties ( ) Check for valid email/username properties
getDefaultModelClasses ( ) Get default model classes

메소드 상세

checkModuleProperties() 보호된 메소드

Check for valid email/username properties
protected checkModuleProperties ( )

createController() 공개 메소드

This is needed because of the way we map actions to "user/default/". We can't use module bootstrapping because that doesn't work when urlManager.enablePrettyUrl = false. Additionally, this requires one less step during installation
public createController ( $route )

getActions() 공개 메소드

Get a list of actions for this module. Used for debugging/initial installations
public getActions ( )

getDefaultModelClasses() 보호된 메소드

Get default model classes
protected getDefaultModelClasses ( )

getVersion() 공개 메소드

Get module version
public getVersion ( ) : string
리턴 string

init() 공개 메소드

public init ( )

model() 공개 메소드

Get object instance of model
public model ( string $name, array $config = [] ) : ActiveRecord
$name string
$config array
리턴 yii\db\ActiveRecord

프로퍼티 상세

$alias 공개적으로 프로퍼티

Alias for module
public $alias

$emailChangeConfirmation 공개적으로 프로퍼티

If true, users will have to confirm their email address after changing it on the account page
public $emailChangeConfirmation

$emailConfirmation 공개적으로 프로퍼티

If true, users will have to confirm their email address after registering (= email activation)
public $emailConfirmation

$emailViewPath 공개적으로 프로퍼티

Email view path
public $emailViewPath

$loginDuration 공개적으로 프로퍼티

Login duration
public $loginDuration

$loginEmail 공개적으로 프로퍼티

If true, users can log in using their email
public $loginEmail

$loginExpireTime 공개적으로 프로퍼티

Login via email token expiration (passed to strtotime())
public $loginExpireTime

$loginRedirect 공개적으로 프로퍼티

Url to redirect to after logging in. If null, will redirect to home page. Note that AccessControl takes precedence over this (see [[yii\web\User::loginRequired()]])
public $loginRedirect

$loginUsername 공개적으로 프로퍼티

If true, users can log in using their username
public $loginUsername

$logoutRedirect 공개적으로 프로퍼티

Url to redirect to after logging out. If null, will redirect to home page
public $logoutRedirect

$modelClasses 공개적으로 프로퍼티

Model classes, e.g., ["User" => "amnah\yii2\user\models\User"] Usage: $user = Yii::$app->getModule("user")->model("User", $config); (equivalent to) $user = new \amnah\yii2\user\models\User($config); The model classes here will be merged with/override the [[getDefaultModelClasses()|default ones]]
public $modelClasses

$requireEmail 공개적으로 프로퍼티

If true, users are required to enter an email
public $requireEmail

$requireUsername 공개적으로 프로퍼티

If true, users are required to enter a username
public $requireUsername

$resetExpireTime 공개적으로 프로퍼티

Reset password token expiration (passed to strtotime())
public $resetExpireTime

$useEmail 공개적으로 프로퍼티

If true, users can enter an email. This is automatically set to true if $requireEmail = true
public $useEmail

$useUsername 공개적으로 프로퍼티

If true, users can enter a username. This is automatically set to true if $requireUsername = true
public $useUsername

$version 보호되어 있는 프로퍼티

Module version
protected $version