You are here

public function MigrationBase::getMessageLevelName in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 includes/base.inc \MigrationBase::getMessageLevelName()

Get human readable name for a message constant.

Return value

string Name.

File

includes/base.inc, line 403
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 getMessageLevelName($constant) {
  $map = array(
    MigrationBase::MESSAGE_ERROR => t('Error'),
    MigrationBase::MESSAGE_WARNING => t('Warning'),
    MigrationBase::MESSAGE_NOTICE => t('Notice'),
    MigrationBase::MESSAGE_INFORMATIONAL => t('Informational'),
  );
  return $map[$constant];
}