You are here

function cmis_field_field_formatter_view in CMIS API 7

Same name and namespace in other branches
  1. 7.2 cmis_field/cmis_field.module \cmis_field_field_formatter_view()

Implements hook_field_formatter_view().

File

cmis_field/cmis_field.module, line 147

Code

function cmis_field_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  switch ($display['type']) {
    case 'cmis_field_link':
      foreach ($items as $delta => $item) {
        $element[$delta]['#markup'] = l($item['title'], 'cmis/browser', array(
          'query' => array(
            'id' => $item['path'],
          ),
        ));
      }
      break;
  }
  return $element;
}