You are here

protected function FeaturesCommands::componentList in Features 8.3

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

Returns a listing of all known components, indexed by source.

2 calls to FeaturesCommands::componentList()
FeaturesCommands::add in src/Commands/FeaturesCommands.php
Add a config item to a feature package.
FeaturesCommands::components in src/Commands/FeaturesCommands.php
List features components.

File

src/Commands/FeaturesCommands.php, line 841

Class

FeaturesCommands
Drush commands for Features.

Namespace

Drupal\features\Commands

Code

protected function componentList() {
  $result = [];
  $config = $this->manager
    ->getConfigCollection();
  foreach ($config as $item) {
    $result[$item
      ->getType()][$item
      ->getShortName()] = $item
      ->getLabel();
  }
  return $result;
}