7 use Symfony\Component\Console\Input\InputInterface;
8 use Symfony\Component\Console\Output\OutputInterface;
28 if ($this->
option(
'quiet')) {
41 $result = $ex->getCode() ?: self::FAILURE;
44 if ($this->
option(
'quiet')) {
72 final protected function login() {
73 if (!$this->getDefinition()->hasOption(
'as')) {
109 if (!$this->getDefinition()->hasOption(
'language')) {
Adds interaction to a console command.
option($name)
Returns option value.
dumpRegisters()
Dump and output system and error messages.
Abstract command with some utility methods.
command()
Command to be executed.
execute(InputInterface $input, OutputInterface $output)
{}
setLanguage()
Set the language for this cli command.
login()
Login a user defined by –as option.
Base exception of exceptions in the Elgg system.
Exception thrown if an error which can only be found on runtime occurs.
elgg_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
_elgg_services()
Get the global service provider.
elgg_get_user_by_username(string $username, bool $try_email=false)
Get a user by username.
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
elgg_login(\ElggUser $user, bool $persistent=false)
Log in a user.
elgg_logout()
Log the current user out.
elgg_is_logged_in()
Returns whether or not the user is currently logged in.