You are here

public function ConfigUpdateUiCliService::inactiveReport in Configuration Update Manager 8

Displays optional config items.

Displays a list of optional config items from your installed modules, themes, or install profile that are not currently in your active config.

Parameters

string $type: Run the report for: module, theme, profile, or "type" for config entity type.

string $name: The machine name of the module, theme, etc. to report on. See config-list-types to list types for config entities; you can also use system.all for all types, or system.simple for simple config.

Return value

array|\Consolidation\OutputFormatters\StructuredData\RowsOfFields If using Drush 8, an array of inactive configuration. If using Drush 9, a structured data object of rows of inactive configuration.

File

config_update_ui/src/ConfigUpdateUiCliService.php, line 165

Class

ConfigUpdateUiCliService
Handles all the logic for commands for various versions of Drush.

Namespace

Drupal\config_update_ui

Code

public function inactiveReport($type, $name) {
  list($activeList, $installList, $optionalList) = $this->configList
    ->listConfig($type, $name);
  $inactiveItems = array_diff($optionalList, $activeList);
  if (!count($inactiveItems)) {
    $this->logger
      ->success(dt('No inactive config.'));
  }
  sort($inactiveItems);
  return $inactiveItems;
}