2c2 index c3adf88..dae4bc3 100644 --- index c3adf88..6449520 100644 5c5,11 @@ -95,7 +95,7 @@ class BlocksController extends ControllerBase { --- @@ -90,12 +90,12 @@ class BlocksController extends ControllerBase { foreach ($customBlocks as $customBlock) { if (array_key_exists('drush', $form) && $form['drush'] === TRUE) { - drush_log('Exported "' . $customBlock['info'] . '"', 'ok'); + \Drupal::logger('Exported "' . $customBlock['info'] . '"', 'ok'); } 13a20,73 @@ -245,7 +245,7 @@ class BlocksController extends ControllerBase { } if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Deleted custom blocks that were not in config', 'ok'); + \Drupal::logger('Deleted custom blocks that were not in config', 'ok'); } StructureSyncHelper::logMessage('Deleted custom blocks that were not in config'); } @@ -296,7 +296,7 @@ class BlocksController extends ControllerBase { $blockContent->save(); if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Imported "' . $block['info'] . '"', 'ok'); + \Drupal::logger('Imported "' . $block['info'] . '"', 'ok'); } StructureSyncHelper::logMessage('Imported "' . $block['info'] . '"'); } @@ -319,7 +319,7 @@ class BlocksController extends ControllerBase { } if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Updated "' . $block['info'] . '"', 'ok'); + \Drupal::logger('Updated "' . $block['info'] . '"', 'ok'); } StructureSyncHelper::logMessage('Updated "' . $block['info'] . '"'); @@ -372,7 +372,7 @@ class BlocksController extends ControllerBase { $blockContent->save(); if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Imported "' . $block['info'] . '"', 'ok'); + \Drupal::logger('Imported "' . $block['info'] . '"', 'ok'); } StructureSyncHelper::logMessage('Imported "' . $block['info'] . '"'); } @@ -390,7 +390,7 @@ class BlocksController extends ControllerBase { ->delete($entities); if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Deleted all custom blocks', 'ok'); + \Drupal::logger('Deleted all custom blocks', 'ok'); } StructureSyncHelper::logMessage('Deleted all custom blocks'); } @@ -416,7 +416,7 @@ class BlocksController extends ControllerBase { $blockContent->save(); if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Imported "' . $block['info'] . '"', 'ok'); + \Drupal::logger('Imported "' . $block['info'] . '"', 'ok'); } StructureSyncHelper::logMessage('Imported "' . $block['info'] . '"'); } 24c84 index 354b4c1..0534faa 100755 --- index 354b4c1..b91bd84 100755 27c87,95 @@ -82,7 +82,7 @@ class MenuLinksController extends ControllerBase { --- @@ -75,14 +75,14 @@ class MenuLinksController extends ControllerBase { ]; if (array_key_exists('drush', $form) && $form['drush'] === TRUE) { - drush_log('Exported "' . $menuLink->title->getValue()[0]['value'] . '" of menu "' . $menuLink->menu_name->getValue()[0]['value'] . '"', 'ok'); + \Drupal::logger('Exported "' . $menuLink->title->getValue()[0]['value'] . '" of menu "' . $menuLink->menu_name->getValue()[0]['value'] . '"', 'ok'); } StructureSyncHelper::logMessage('Exported "' . $menuLink->title->value . '" of menu "' . $menuLink->menu_name->value . '"'); } 35a104,148 @@ -232,7 +232,7 @@ class MenuLinksController extends ControllerBase { } if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Deleted menu links that were not in config', 'ok'); + \Drupal::logger('Deleted menu links that were not in config', 'ok'); } StructureSyncHelper::logMessage('Deleted menu links that were not in config'); } @@ -341,7 +341,7 @@ class MenuLinksController extends ControllerBase { } if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Imported "' . $menuLink['title'] . '" into ' . $menuLink['menu_name'], 'ok'); + \Drupal::logger('Imported "' . $menuLink['title'] . '" into ' . $menuLink['menu_name'], 'ok'); } StructureSyncHelper::logMessage('Imported "' . $menuLink['title'] . '" into ' . $menuLink['menu_name']); @@ -397,7 +397,7 @@ class MenuLinksController extends ControllerBase { ])->save(); if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Imported "' . $menuLink['title'] . '" into "' . $menuLink['menu_name'] . '" menu', 'ok'); + \Drupal::logger('Imported "' . $menuLink['title'] . '" into "' . $menuLink['menu_name'] . '" menu', 'ok'); } StructureSyncHelper::logMessage('Imported "' . $menuLink['title'] . '" into "' . $menuLink['menu_name'] . '" menu'); } @@ -415,7 +415,7 @@ class MenuLinksController extends ControllerBase { ->delete($entities); if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Deleted all (content) menu links', 'ok'); + \Drupal::logger('Deleted all (content) menu links', 'ok'); } StructureSyncHelper::logMessage('Deleted all (content) menu links'); } @@ -442,7 +442,7 @@ class MenuLinksController extends ControllerBase { ])->save(); if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Imported "' . $menuLink['title'] . '" into "' . $menuLink['menu_name'] . '" menu', 'ok'); + \Drupal::logger('Imported "' . $menuLink['title'] . '" into "' . $menuLink['menu_name'] . '" menu', 'ok'); } StructureSyncHelper::logMessage('Imported "' . $menuLink['title'] . '" into "' . $menuLink['menu_name'] . '" menu'); } 46c159 index 50aa309..4a906e7 100755 --- index 50aa309..ca77964 100755 58c171,177 @@ -149,7 +149,7 @@ class TaxonomiesController extends ControllerBase { --- @@ -144,12 +144,12 @@ class TaxonomiesController extends ControllerBase { $this->config->set('taxonomies.' . $vocabulary, $taxonomies)->save(); if (array_key_exists('drush', $form) && $form['drush'] === TRUE) { - drush_log('Exported ' . $vocabulary, 'ok'); + \Drupal::logger('Exported ' . $vocabulary, 'ok'); } 66a186,239 @@ -311,7 +311,7 @@ class TaxonomiesController extends ControllerBase { } if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Deleted taxonomies that were not in config', 'ok'); + \Drupal::logger('Deleted taxonomies that were not in config', 'ok'); } StructureSyncHelper::logMessage('Deleted taxonomies that were not in config'); } @@ -465,7 +465,7 @@ class TaxonomiesController extends ControllerBase { } if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Imported "' . $taxonomy['name'] . '" into ' . $vid, 'ok'); + \Drupal::logger('Imported "' . $taxonomy['name'] . '" into ' . $vid, 'ok'); } StructureSyncHelper::logMessage('Imported "' . $taxonomy['name'] . '" into ' . $vid); @@ -494,7 +494,7 @@ class TaxonomiesController extends ControllerBase { StructureSyncHelper::logMessage('Flushing all caches'); if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Flushing all caches', 'ok'); + \Drupal::logger('Flushing all caches', 'ok'); } drupal_flush_all_caches(); @@ -615,7 +615,7 @@ class TaxonomiesController extends ControllerBase { } if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Imported "' . $taxonomy['name'] . '" into ' . $vid, 'ok'); + \Drupal::logger('Imported "' . $taxonomy['name'] . '" into ' . $vid, 'ok'); } StructureSyncHelper::logMessage('Imported "' . $taxonomy['name'] . '" into ' . $vid); @@ -675,7 +675,7 @@ class TaxonomiesController extends ControllerBase { $controller->delete($entities); if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Deleted all taxonomies', 'ok'); + \Drupal::logger('Deleted all taxonomies', 'ok'); } StructureSyncHelper::logMessage('Deleted all taxonomies'); } @@ -782,7 +782,7 @@ class TaxonomiesController extends ControllerBase { } if (array_key_exists('drush', $context) && $context['drush'] === TRUE) { - drush_log('Imported "' . $taxonomy['name'] . '" into ' . $vid, 'ok'); + \Drupal::logger('Imported "' . $taxonomy['name'] . '" into ' . $vid, 'ok'); } StructureSyncHelper::logMessage('Imported "' . $taxonomy['name'] . '" into ' . $vid); 232a406,417 diff --git a/structure_sync.info.yml b/structure_sync.info.yml index af35835..b1a6b79 100755 --- a/structure_sync.info.yml +++ b/structure_sync.info.yml @@ -1,6 +1,7 @@ name: 'Structure Sync' description: 'Tool for syncing structural data that is stored as content.' core: 8.x +core_version_requirement: ^8 || ^9 configure: structure_sync.general.form dependencies: - drupal:taxonomy