PHP Класс console\controllers\InitAdminController

Below are some common usages of this command: ~~~ # init root user yii init-admin # init root user yii init-admin --username=root --password=qwerty ~~~
Автор: Taras Makitra ([email protected])
Наследование: extends yii\console\Controller
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$allowOverwrite indicate whether is root user initialization allowed more that one time.
$db the DB connection object or the application component ID of the DB connection.
$defaultAction the default command action.
$email email of root user.
$interactive whether to execute the migration in an interactive mode.
$password password of root user.
$username username of root user.

Открытые методы

Метод Описание
actionInit ( ) Init root user.
beforeAction ( Action $action ) : boolean This method is invoked right before an action is to be executed (after all possible filters.)
options ( $actionId )

Приватные методы

Метод Описание
canUpdateRootUser ( )
createUser ( $username, $password, $email )
validateEmail ( $email )
validatePassword ( $password )
validateUsername ( $username )

Описание методов

actionInit() публичный Метод

For example, ~~~ yii init-admin yii init-admin --username=admin --password=admin123 ~~~
public actionInit ( )

beforeAction() публичный Метод

This method is invoked right before an action is to be executed (after all possible filters.)
public beforeAction ( Action $action ) : boolean
$action yii\base\Action the action to be executed.
Результат boolean whether the action should continue to be executed.

options() публичный Метод

public options ( $actionId )

Описание свойств

$allowOverwrite публичное свойство

indicate whether is root user initialization allowed more that one time.
public $allowOverwrite

$db публичное свойство

the DB connection object or the application component ID of the DB connection.
public $db

$defaultAction публичное свойство

the default command action.
public $defaultAction

$email публичное свойство

email of root user.
public $email

$interactive публичное свойство

whether to execute the migration in an interactive mode.
public $interactive

$password публичное свойство

password of root user.
public $password

$username публичное свойство

username of root user.
public $username