function _drush_features_component_list in Features 8.3
Same name and namespace in other branches
- 8.4 drush/features.drush8.inc \_drush_features_component_list()
- 6 features.drush.inc \_drush_features_component_list()
- 7.2 features.drush.inc \_drush_features_component_list()
- 7 features.drush.inc \_drush_features_component_list()
Returns a listing of all known components, indexed by source.
2 calls to _drush_features_component_list()
- drush_features_add in drush/
features.drush8.inc - Adds a component to a features module.
- drush_features_components in drush/
features.drush8.inc - Lists components, with pattern matching.
File
- drush/
features.drush8.inc, line 703 - Features module drush integration.
Code
function _drush_features_component_list() {
$result = [];
/** @var \Drupal\features\FeaturesManagerInterface $manager */
$manager = \Drupal::service('features.manager');
$config = $manager
->getConfigCollection();
foreach ($config as $item_name => $item) {
$result[$item
->getType()][$item
->getShortName()] = $item
->getLabel();
}
return $result;
}