You are here

function sms_sendtophone_field_formatter_view in SMS Framework 7

Implements hook_field_formatter_view().

File

modules/sms_sendtophone/sms_sendtophone.module, line 336
Provides various tools for sending bits of information via SMS.

Code

function sms_sendtophone_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  switch ($display['type']) {
    case 'sms_sendtophone':
      foreach ($items as $delta => $item) {
        $text = check_plain(strip_tags($item['value']));
        $element[$delta] = array(
          '#type' => 'markup',
          '#theme' => 'sms_sendtophone_field',
          '#text' => $text,
        );
      }
      break;
  }
  return $element;
}