public function ConfigSyncCommands::syncListUpdates in Configuration Synchronizer 8.2
Same name and namespace in other branches
- 8 src/Commands/ConfigSyncCommands.php \Drupal\config_sync\Commands\ConfigSyncCommands::syncListUpdates()
Displays a list of all extensions with available configuration updates.
@command config-sync-list-updates @usage drush config-sync-list-updates Display a list of all extensions with available configuration updates. @aliases cs-list @field-labels type: Operation type id: Config ID collection: Collection label: Label extension_type: Extension type extension: Extension @default-fields extension,type,label
Return value
\Consolidation\OutputFormatters\StructuredData\RowsOfFields
File
- src/
Commands/ ConfigSyncCommands.php, line 84
Class
- ConfigSyncCommands
- Drush integration for the Configuration Synchronizer module.
Namespace
Drupal\config_sync\CommandsCode
public function syncListUpdates($options = [
'format' => 'table',
]) {
$rows = [];
foreach ($this->configSyncLister
->getExtensionChangelists() as $extension_type => $extensions) {
foreach ($extensions as $extension_id => $collection_changelists) {
foreach ($collection_changelists as $collection => $operation_types) {
foreach ($operation_types as $operation_type => $configurations) {
foreach ($configurations as $config_id => $config_label) {
$rows[$config_id] = [
'type' => $operation_type,
'id' => $config_id,
'collection' => $collection === '' ? 'default' : $collection,
'label' => $config_label,
'extension_type' => $extension_type,
'extension' => $extension_id,
];
}
}
}
}
}
return new RowsOfFields($rows);
}