\App\ConsoleModule\CommandsUserEditCommand

CLI command for user management

Summary

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

Properties

$userManager

$userManager : \App\ConsoleModule\Models\ConsoleUserManager

Type

normal — User manager

$defaultName

$defaultName : string

Type

normal — Command name

Methods

__construct()

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

Constructor

Parameters

\App\ConsoleModule\Models\ConsoleUserManager $userManager

User manager

Returns

mixed

askUserName()

askUserName(\Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : \App\Models\Database\Entities\User

Asks for the username

Parameters

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

Command input

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

Command output

Returns

\App\Models\Database\Entities\User —

Information about the user

configure()

configure() : void

Configures the user edit command

execute()

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

Executes the user edit command

Parameters

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

Command input

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

Command output

Returns

int —

Exit code

askRole()

askRole(\App\Models\Database\Entities\User  $user, \Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : string

Asks for the user's role

Parameters

\App\Models\Database\Entities\User $user

Information about the user

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

Command input

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

Command output

Returns

string —

New user's role

askLanguage()

askLanguage(\App\Models\Database\Entities\User  $user, \Symfony\Component\Console\Input\InputInterface  $input, \Symfony\Component\Console\Output\OutputInterface  $output) : string

Asks for the user's language

Parameters

\App\Models\Database\Entities\User $user

Information about the user

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

Command input

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

Command output

Returns

string —

New user's language