You are here

function Messaging_Destination::format in Messaging 7

Format destination

File

./messaging.destination.inc, line 319
Drupal Messaging Framework - Default class file

Class

Messaging_Destination
Message destination class

Code

function format($type = 'short', $format = MESSAGING_FORMAT_PLAIN) {
  $address = $this
    ->get_address();
  switch ($type) {
    case 'short':
      return $this
        ->format_address($address, $format);
    case 'long':
      return $this
        ->get_name() . ': ' . $this
        ->format_address($address, $format);
  }
}