You are here

public function WebformCliService::drush_webform_libraries_status in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Commands/WebformCliService.php \Drupal\webform\Commands\WebformCliService::drush_webform_libraries_status()

Implements drush_hook_COMMAND().

Overrides WebformCliServiceInterface::drush_webform_libraries_status

File

src/Commands/WebformCliService.php, line 674

Class

WebformCliService
Drush version agnostic commands.

Namespace

Drupal\webform\Commands

Code

public function drush_webform_libraries_status() {
  module_load_include('install', 'webform');

  /** @var \Drupal\webform\WebformLibrariesManagerInterface $libraries_manager */
  $libraries_manager = \Drupal::service('webform.libraries_manager');
  $requirements = $libraries_manager
    ->requirements();
  $description = $requirements['webform_libraries']['description'];
  $description = strip_tags($description, '<dt><dd><dl>');
  $description = MailFormatHelper::htmlToText($description);
  $this
    ->drush_print($description);
}