AbstractThemeCommand
extends Command
in package
Abstract base class for theme resource generator commands.
Tags
Table of Contents
- $extraSuccessMessage : string
- Extra text to append to the output when generation is successful.
- $generator : GeneratorInterface
- Theme resource generator
- $type : string
- Type of resource being generated (used in help messages)
- __construct() : mixed
- Constructor
- configure() : void
- Configure the command.
- execute() : int
- Run the command.
- generate() : bool
- Run the generator.
Properties
$extraSuccessMessage
Extra text to append to the output when generation is successful.
protected
string
$extraSuccessMessage
= ''
$generator
Theme resource generator
protected
GeneratorInterface
$generator
$type
Type of resource being generated (used in help messages)
protected
string
$type
Methods
__construct()
Constructor
public
__construct(GeneratorInterface $generator[, string|null $name = null ]) : mixed
Parameters
- $generator : GeneratorInterface
-
Generator to call
- $name : string|null = null
-
The name of the command; passing null means it must be set in configure()
Return values
mixed —configure()
Configure the command.
protected
configure() : void
Return values
void —execute()
Run the command.
protected
execute(InputInterface $input, OutputInterface $output) : int
Parameters
- $input : InputInterface
-
Input object
- $output : OutputInterface
-
Output object
Return values
int —0 for success
generate()
Run the generator.
protected
generate(string $name) : bool
Parameters
- $name : string
-
Name of resource to generate