You are here

public static function MenuLinksController::menuLinksImportFinishedCallback in Structure Sync 2.x

Same name and namespace in other branches
  1. 8 src/Controller/MenuLinksController.php \Drupal\structure_sync\Controller\MenuLinksController::menuLinksImportFinishedCallback()

Function that signals that the import of menu links has finished.

1 call to MenuLinksController::menuLinksImportFinishedCallback()
MenuLinksController::importMenuLinks in src/Controller/MenuLinksController.php
Function to import menu links.

File

src/Controller/MenuLinksController.php, line 454

Class

MenuLinksController
Controller for syncing menu links.

Namespace

Drupal\structure_sync\Controller

Code

public static function menuLinksImportFinishedCallback($success, $results, $operations) {
  StructureSyncHelper::logMessage('Flushing all caches');
  drupal_flush_all_caches();
  StructureSyncHelper::logMessage('Successfully flushed caches');
  StructureSyncHelper::logMessage('Successfully imported menu links');
  \Drupal::messenger()
    ->addStatus(t('Successfully imported menu links'));
}