function drush_outputformat_message::format

8.0.x message.inc drush_outputformat_message::format($data, $metadata)
6.x message.inc drush_outputformat_message::format($data, $metadata)
7.x message.inc drush_outputformat_message::format($data, $metadata)
master message.inc drush_outputformat_message::format($data, $metadata)

Overrides drush_outputformat::format

File

commands/core/outputformat/message.inc, line 21

Class

drush_outputformat_message
Output formatter 'message'

Code

function format($data, $metadata) {
  $result = '';
  if (isset($metadata['message-template'])) {
    foreach ($data as $key => $value) {
      $data_for_dt['!' . $key] = $value;
    }
    $result = dt($metadata['message-template'], $data_for_dt);
  }
  return $result;
}