class MmmfListCommand in Module Missing Message Fixer 2.0.x
Same name and namespace in other branches
- 8 src/Commands/MmmfListCommand.php \Drupal\module_missing_message_fixer\Commands\MmmfListCommand
Class MmmfListCommand.
@package Drupal\module_missing_message_fixer
Hierarchy
- class \Drupal\module_missing_message_fixer\Commands\MmmfListCommand extends \Drush\Commands\DrushCommands
Expanded class hierarchy of MmmfListCommand
1 string reference to 'MmmfListCommand'
1 service uses MmmfListCommand
File
- src/
Commands/ MmmfListCommand.php, line 14
Namespace
Drupal\module_missing_message_fixer\CommandsView source
class MmmfListCommand extends DrushCommands {
/**
* The ModuleMissingMessageFixer service.
*
* @var \Drupal\module_missing_message_fixer\ModuleMissingMessageFixer
*/
protected $fixer;
/**
* MmmfFixCommand constructor.
*
* @param \Drupal\module_missing_message_fixer\ModuleMissingMessageFixer $mmmf
* The CLI service which allows interoperability.
*/
public function __construct(ModuleMissingMessageFixer $mmmf) {
$this->fixer = $mmmf;
}
/**
* Returns a list of modules that have missing messages.
*
* @command module-missing-message-fixer:list
*
* @usage drush module-missing-message-fixer:list
* Returns a list of modules that have missing messages.
*
* @aliases mmmfl
*
* @field-labels
* name: Name
* type: Type
*/
public function listCommand() {
$rows = $this->fixer
->getTableRows();
if (count($rows) > 0) {
$table[] = $this->fixer
->getTableHeader();
foreach ($rows as $row) {
$table[] = $row;
}
return new RowsOfFields($table);
}
$this
->output()
->writeln('No Missing Modules Found!!!');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MmmfListCommand:: |
protected | property | The ModuleMissingMessageFixer service. | |
MmmfListCommand:: |
public | function | Returns a list of modules that have missing messages. | |
MmmfListCommand:: |
public | function | MmmfFixCommand constructor. |