Property | Type | Description | |
---|---|---|---|
$appPath | string | Craft app path | |
$basePath | string | Craft base path | |
$configPath | string | Craft config path | |
$craft | Craft\ConsoleApp | Craft app instance | |
$description | string | The console command description. | |
$input | Symfony\Component\Console\Input\InputInterface | The input interface implementation. | |
$name | string | The console command name. | |
$output | Symfony\Component\Console\Style\StyleInterface | The output interface implementation. | |
$pluginsPath | string | Craft plugins path | |
$showsDuration | boolean | Whether to show the command's duration after the command finishes | |
$storagePath | string | Craft storage path | |
$templatesPath | string | Craft templates path | |
$translationsPath | string | Craft translations path |
Method | Description | |
---|---|---|
anticipate ( string $question, array $choices, string $default = null ) : string | Prompt the user for input with auto completion. | |
argument ( string $key = null ) : string | array | Get the value of a command argument. | |
ask ( string $question, string $default = null ) : string | Prompt the user for input. | |
askWithCompletion ( string $question, array $choices, string $default = null ) : string | Prompt the user for input with auto completion. | |
choice ( string $question, array $choices, string $default = null, mixed $attempts = null, boolean $multiple = null ) : boolean | Give the user a single choice from an array of answers. | |
comment ( string $string ) : void | Write a string as comment output. | |
confirm ( string $question, boolean $default = false ) : boolean | Confirm a question with the user. | |
error ( string $string ) : void | Write a string as error output. | |
info ( string $string ) : void | Write a string as information output. | |
line ( string $string ) : void | Write a string as standard output. | |
option ( string $key = null ) : string | array | Get the value of a command option. | |
question ( string $string ) : void | Write a string as question output. | |
run ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : integer | Run the console command. | |
secret ( string $question, boolean $fallback = true ) : string | Prompt the user for input but hide the answer from the console. | |
setAppPath ( $path ) | ||
setBasePath ( $path ) | ||
setConfigPath ( $path ) | ||
setCraft ( Craft\ConsoleApp $craft ) | ||
setEnvironment ( $environment ) | ||
setPluginsPath ( $path ) | ||
setStoragePath ( $path ) | ||
setTemplatesPath ( $path ) | ||
setTranslationsPath ( $path ) | ||
table ( array $headers, array $rows, string $style = 'default' ) : void | Format input to textual table. | |
warn ( string $string ) : void | Write a string as warning output. |
Method | Description | |
---|---|---|
configure ( ) : void | Specify the arguments and options on the command. | |
execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output ) : mixed | Execute the console command. | |
fire ( ) : mixed | Execute the console command. | |
getArguments ( ) : array | Get the console command arguments. | |
getOptions ( ) : array | Get the console command options. | |
suppressOutput ( callable $callback ) : mixed | Useful for supressing log messages |
protected getArguments ( ) : array | ||
return | array |
protected getOptions ( ) : array | ||
return | array |
protected suppressOutput ( callable $callback ) : mixed | ||
$callback | callable | |
return | mixed |
protected ConsoleApp,Craft $craft | ||
return | Craft\ConsoleApp |
protected string $description | ||
return | string |
protected InputInterface,Symfony\Component\Console\Input $input | ||
return | Symfony\Component\Console\Input\InputInterface |
protected StyleInterface,Symfony\Component\Console\Style $output | ||
return | Symfony\Component\Console\Style\StyleInterface |
protected bool $showsDuration | ||
return | boolean |
protected string $templatesPath | ||
return | string |
protected string $translationsPath | ||
return | string |