class GenerateCommands extends DrushCommands (View source)

Drush generate command.

Traits

ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

No description

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

generate($generator = '', $options = ['answers' => self::REQ, 'directory' => self::REQ])

Generate boilerplate code for modules/plugins/services etc.

Application
createApplication()

Creates Drush generate application.

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

generate($generator = '', $options = ['answers' => self::REQ, 'directory' => self::REQ])

Generate boilerplate code for modules/plugins/services etc.

Drush asks questions so that the generated code is as polished as possible. After generating, Drush lists the files that were created.

Parameters

$generator
$options

protected Application createApplication()

Creates Drush generate application.

Return Value

Application Symfony console application.