\App\ConsoleModule\CommandsUserAddCommand

CLI command for user management

Summary

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

Properties

$defaultName

$defaultName : string

Type

normal — Command name

$repository

$repository : \App\Models\Database\Repositories\UserRepository

Type

normal — User database repository

$entityManager

$entityManager : \App\Models\Database\EntityManager

Type

normal — Entity manager

Methods

__construct()

__construct(\App\Models\Database\EntityManager  $entityManager) : mixed

Constructor

Parameters

\App\Models\Database\EntityManager $entityManager

Entity 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