public function ModuleMissingMessageFixer::checkModules in Module Missing Message Fixer 8
Helper function to check for modules to fix.
Parameters
bool $return: If we are to return to rows or just print the list.
Return value
string|null The printed output.
File
- src/
ModuleMissingMessageFixer.php, line 62
Class
- ModuleMissingMessageFixer
- Class ModuleMissingMessageFixer.
Namespace
Drupal\module_missing_message_fixerCode
public function checkModules($return = FALSE) {
if ($return) {
return $this
->getTableRows();
}
$rows = [];
// Use a key for the head row that is not a valid module name.
$rows['*HEAD*'] = ModuleMissingMessageFixer::getTableHeader();
$rows += ModuleMissingMessageFixer::getTableRows();
// Print Table here instead of in the hook_command.
$output = count($rows) > 1 ? drush_format_table($rows, TRUE) : 'No Missing Modules Found!!!';
drush_print($output);
return NULL;
}