comparison core/modules/config/src/Form/ConfigSync.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
178 $form['actions']['submit'] = [ 178 $form['actions']['submit'] = [
179 '#type' => 'submit', 179 '#type' => 'submit',
180 '#value' => $this->t('Import all'), 180 '#value' => $this->t('Import all'),
181 ]; 181 ];
182 $source_list = $this->syncStorage->listAll(); 182 $source_list = $this->syncStorage->listAll();
183 $storage_comparer = new StorageComparer($this->syncStorage, $this->activeStorage, $this->configManager); 183 $storage_comparer = new StorageComparer($this->syncStorage, $this->activeStorage);
184 if (empty($source_list) || !$storage_comparer->createChangelist()->hasChanges()) { 184 if (empty($source_list) || !$storage_comparer->createChangelist()->hasChanges()) {
185 $form['no_changes'] = [ 185 $form['no_changes'] = [
186 '#type' => 'table', 186 '#type' => 'table',
187 '#header' => [$this->t('Name'), $this->t('Operations')], 187 '#header' => [$this->t('Name'), $this->t('Operations')],
188 '#rows' => [], 188 '#rows' => [],
197 return $form; 197 return $form;
198 } 198 }
199 // A list of changes will be displayed, so check if the user should be 199 // A list of changes will be displayed, so check if the user should be
200 // warned of potential losses to configuration. 200 // warned of potential losses to configuration.
201 if ($this->snapshotStorage->exists('core.extension')) { 201 if ($this->snapshotStorage->exists('core.extension')) {
202 $snapshot_comparer = new StorageComparer($this->activeStorage, $this->snapshotStorage, $this->configManager); 202 $snapshot_comparer = new StorageComparer($this->activeStorage, $this->snapshotStorage);
203 if (!$form_state->getUserInput() && $snapshot_comparer->createChangelist()->hasChanges()) { 203 if (!$form_state->getUserInput() && $snapshot_comparer->createChangelist()->hasChanges()) {
204 $change_list = []; 204 $change_list = [];
205 foreach ($snapshot_comparer->getAllCollectionNames() as $collection) { 205 foreach ($snapshot_comparer->getAllCollectionNames() as $collection) {
206 foreach ($snapshot_comparer->getChangelist(NULL, $collection) as $config_names) { 206 foreach ($snapshot_comparer->getChangelist(NULL, $collection) as $config_names) {
207 if (empty($config_names)) { 207 if (empty($config_names)) {