4 * Output formatter 'message'
7 * The parameters for the render data
9 * 'message-template' - Provides the template string to use with dt().
13 * return array('a' => 1, 'b' => 2);
15 * Given 'message-template' == 'The first is !a and the second is !b',
16 * output with --format=message:
18 * The first is 1 and the second is 2
20 class drush_outputformat_message extends drush_outputformat {
21 function format($data, $metadata) {
23 if (isset($metadata['message-template'])) {
24 foreach ($data as $key => $value) {
25 $data_for_dt['!' . $key] = $value;
27 $result = dt($metadata['message-template'], $data_for_dt);