\App\ConsoleModule\CommandsUserAddCommand

CLI command for user management

Summary

Methods
Properties
Constants
__construct()
No public properties found
No constants found
configure()
execute()
$defaultName
$userManager
N/A
askUserName()
askPassword()
askRole()
askLanguage()
No private properties found
N/A

Properties

$defaultName

$defaultName : string

Type

normal — Command name

$userManager

$userManager : \App\ConsoleModule\Models\ConsoleUserManager

Type

normal — User manager

Methods

__construct()

__construct(\App\ConsoleModule\Models\ConsoleUserManager  $userManager) : mixed

Constructor

Parameters

\App\ConsoleModule\Models\ConsoleUserManager $userManager

User manager

Returns

mixed

configure()

configure() : void

Configures the user add command

execute()

execute(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : int

Executes the user add command

Parameters

\Symfony\Component\Console\Input\InputInterface $input

Command input

\Symfony\Component\Console\Output\OutputInterface $output

Command output

Returns

int —

Exit code

askUserName()

askUserName(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : string

Asks for the username

Parameters

\Symfony\Component\Console\Input\InputInterface $input

Command input

\Symfony\Component\Console\Output\OutputInterface $output

Command output

Returns

string —

Username

askPassword()

askPassword(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : string

Asks for the user's password

Parameters

\Symfony\Component\Console\Input\InputInterface $input

Command input

\Symfony\Component\Console\Output\OutputInterface $output

Command output

Returns

string —

User's password

askRole()

askRole(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : string

Asks for the user's role

Parameters

\Symfony\Component\Console\Input\InputInterface $input

Command input

\Symfony\Component\Console\Output\OutputInterface $output

Command output

Returns

string —

User's role

askLanguage()

askLanguage(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : string

Asks for the user's language

Parameters

\Symfony\Component\Console\Input\InputInterface $input

Command input

\Symfony\Component\Console\Output\OutputInterface $output

Command output

Returns

string —

User's language