You are here

function migrate_ui_capture_message in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 migrate_ui/migrate_ui.pages.inc \migrate_ui_capture_message()

Store a message to be displayed later.

Ignore the message if $level is set to 'debug'.

Parameters

string $message: the message to be displayed

string $level: the type of the message: 'debug', 'completed', 'failed', or a valid $type used by drupal_set_message()

1 string reference to 'migrate_ui_capture_message'
migrate_ui_batch in migrate_ui/migrate_ui.pages.inc
Implements callback_batch_operation().

File

migrate_ui/migrate_ui.pages.inc, line 706
Pages for managing migration processes.

Code

function migrate_ui_capture_message($message, $level) {
  if ($level != 'debug') {

    // Store each message as an array with keys 'message' and 'level'.
    global $_migrate_messages;
    $_migrate_messages[] = array(
      'message' => filter_xss_admin($message),
      'level' => check_plain($level),
    );
  }
}