33 }
catch (\Exception $ex) {
55 abstract protected function command();
63 final protected function login() {
64 if (!$this->getDefinition()->hasOption(
'as')) {
100 if (!$this->getDefinition()->hasOption(
'language')) {
elgg_is_logged_in()
Returns whether or not the user is currently logged in.
execute(InputInterface $input, OutputInterface $output)
{}
Exception thrown if an error which can only be found on runtime occurs.
elgg_get_user_by_username(string $username, bool $try_email=false)
Get a user by username.
Adds interaction to a console command.
login()
Login a user defined by –as option.
error($message)
Print an error.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
elgg_logout()
Log the current user out.
dumpRegisters()
Dump and output system and error messages.
elgg_log($message, $level=\Psr\Log\LogLevel::NOTICE)
Log a message.
Abstract command with some utility methods.
elgg_login(\ElggUser $user, bool $persistent=false)
Log in a user.
_elgg_services()
Get the global service provider.
command()
Command to be executed.
option($name)
Returns option value.
setLanguage()
Set the language for this cli command.