public function MigrationBase::saveMessage in Migrate 7.2
Same name and namespace in other branches
- 6.2 includes/base.inc \MigrationBase::saveMessage()
Default to printing messages, but derived classes are expected to save messages indexed by current source ID.
Parameters
string $message: The message to record.
int $level: Optional message severity (defaults to MESSAGE_ERROR).
3 calls to MigrationBase::saveMessage()
- MigrateSQLMap::saveMessage in plugins/
sources/ sqlmap.inc - Record a message in the migration's message table.
- MigrationBase::errorHandler in includes/
base.inc - Custom PHP error handler. TODO: Redundant with hook_watchdog?
- MigrationBase::handleException in includes/
base.inc - Takes an Exception object and both saves and displays it, pulling additional information on the location triggering the exception.
1 method overrides MigrationBase::saveMessage()
- Migration::saveMessage in includes/
migration.inc - Pass messages through to the map class.
File
- includes/
base.inc, line 689 - Defines the base class for migration processes.
Class
- MigrationBase
- The base class for all objects representing distinct steps in a migration process. Most commonly these will be Migration objects which actually import data from a source into a Drupal destination, but by deriving classes directly from MigrationBase…
Code
public function saveMessage($message, $level = MigrationBase::MESSAGE_ERROR) {
switch ($level) {
case MigrationBase::MESSAGE_ERROR:
$level = 'error';
break;
case MigrationBase::MESSAGE_WARNING:
$level = 'warning';
break;
case MigrationBase::MESSAGE_NOTICE:
$level = 'notice';
break;
case MigrationBase::MESSAGE_INFORMATIONAL:
$level = 'status';
break;
}
self::displayMessage($message, $level);
}