class MigrateMessage

Same name in other branches
  1. 9 core/modules/migrate/src/MigrateMessage.php \Drupal\migrate\MigrateMessage
  2. 8.9.x core/modules/migrate/src/MigrateMessage.php \Drupal\migrate\MigrateMessage
  3. 10 core/modules/migrate/src/MigrateMessage.php \Drupal\migrate\MigrateMessage

Defines a migrate message class.

Hierarchy

Expanded class hierarchy of MigrateMessage

1 file declares its use of MigrateMessage
Sql.php in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php

File

core/modules/migrate/src/MigrateMessage.php, line 10

Namespace

Drupal\migrate
View source
class MigrateMessage implements MigrateMessageInterface {
    
    /**
     * The map between migrate status and watchdog severity.
     *
     * @var array
     */
    protected $map = [
        'status' => RfcLogLevel::INFO,
        'error' => RfcLogLevel::ERROR,
    ];
    
    /**
     * {@inheritdoc}
     */
    public function display($message, $type = 'status') {
        $type = $this->map[$type] ?? RfcLogLevel::NOTICE;
        \Drupal::logger('migrate')->log($type, $message);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
MigrateMessage::$map protected property The map between migrate status and watchdog severity.
MigrateMessage::display public function Displays a migrate message. Overrides MigrateMessageInterface::display

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.