You are here

public static function BlocksController::blocksImportFinishedCallback in Structure Sync 2.x

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

Function that signals that the import of custom blocks has finished.

1 call to BlocksController::blocksImportFinishedCallback()
BlocksController::importBlocks in src/Controller/BlocksController.php
Function to import custom blocks.

File

src/Controller/BlocksController.php, line 428

Class

BlocksController
Controller for syncing custom blocks.

Namespace

Drupal\structure_sync\Controller

Code

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