You are here

function drush_bootstrap_generate_docs in Express 8

Generates markdown documentation.

Parameters

string $type:

File

themes/contrib/bootstrap/bootstrap.drush.inc, line 29
Drupal Bootstrap Drush commands.

Code

function drush_bootstrap_generate_docs($type = 'all') {
  $types = $type === 'all' ? [
    'settings',
  ] : [
    $type,
  ];
  foreach ($types as $type) {
    $function = "_drush_bootstrap_generate_docs_{$type}";
    if (function_exists($function)) {
      $ret = $function(Bootstrap::getTheme('bootstrap'));
      if ($ret) {
        drush_log('Successfully generated documentation for: ' . $type, 'success');
      }
      else {
        drush_log('Unable to generate documentation for: ' . $type, 'error');
      }
    }
    else {
      drush_log('Invalid documentation type: ' . $type, 'error');
    }
  }
}