function _drush_onlyone_summary in Allow a content type only once (Only One) 7
Same name and namespace in other branches
- 8 onlyone.drush.inc \_drush_onlyone_summary()
List the summary for all the content types.
File
- ./
onlyone.drush.inc, line 169 - Drush commands related to the Only One module.
Code
function _drush_onlyone_summary() {
// Loading the helper functions file.
module_load_include('inc', 'onlyone', 'onlyone.helpers');
$available_content_types = _onlyone_available_content_types();
$not_available_content_types = _onlyone_not_available_content_types();
$content_types_summary = array_merge($available_content_types, $not_available_content_types);
// Sorting all the elements.
asort($content_types_summary);
if (count($content_types_summary)) {
drush_print(dt('Status summary:'));
drush_print(' ' . implode("\n ", $content_types_summary));
}
else {
drush_log(dt('There are no content types on the site.'), 'warning');
}
}