You are here

function cvm_field_default_markup in Contextual View Modes 7

Returns the output for the field formatter

Parameters

[type] $entity_type [description]:

[type] $entity [description]:

[type] $field [description]:

[type] $instance [description]:

[type] $langcode [description]:

[type] $items [description]:

[type] $display [description]:

Return value

string of HTML markup

1 call to cvm_field_default_markup()
cvm_field_field_formatter_view in modules/cvm_field/cvm_field.module
Implements hook_field_formatter_view().

File

modules/cvm_field/cvm_field.module, line 122

Code

function cvm_field_default_markup($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  if (empty($items)) {
    return t('No contextual view modes set.');
  }
  $data = array();
  foreach ($items as $k => $opts) {
    $data[] = t('When context') . " <strong>" . $opts['context'] . "</strong> " . t('is true display with view mode') . ": <strong>" . $opts['view_mode'] . "</strong>";
  }
  $output = theme_item_list(array(
    'items' => $data,
    'type' => 'ul',
    'title' => "",
    'attributes' => array(),
  ));
  return $output;
}