\App\ConsoleModule\CommandsUserEditCommand

CLI command for user management

Summary

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

Properties

$repository

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

Type

normal — User database repository

$entityManager

$entityManager : \App\Models\Database\EntityManager

Type

normal — Entity manager

$defaultName

$defaultName : string

Type

normal — Command name

Methods

__construct()

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

Constructor

Parameters

\App\Models\Database\EntityManager $entityManager

Entity 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