You are here

protected function FeaturesCommands::componentPrint in Features 8.4

Same name and namespace in other branches
  1. 8.3 src/Commands/FeaturesCommands.php \Drupal\features\Commands\FeaturesCommands::componentPrint()

Prints a list of filtered components.

1 call to FeaturesCommands::componentPrint()
FeaturesCommands::components in src/Commands/FeaturesCommands.php
List features components.

File

src/Commands/FeaturesCommands.php, line 1037

Class

FeaturesCommands
Drush commands for Features.

Namespace

Drupal\features\Commands

Code

protected function componentPrint($filtered_components) {
  $rows = [];
  foreach ($filtered_components['components'] as $source => $components) {
    foreach ($components as $name => $value) {
      $row = [
        'source' => $source . ':' . $name,
      ];
      if (isset($filtered_components['sources'][$source . ':' . $name])) {
        $row['source'] = dt('Provided by') . ': ' . $filtered_components['sources'][$source . ':' . $name];
      }
      $rows[] = $row;
    }
  }
  return new RowsOfFields($rows);
}