You are here

function addthis_render_formatter_view in AddThis 7.4

2 calls to addthis_render_formatter_view()
addthis_displays_field_formatter_view in addthis_displays/addthis_displays.field.inc
Implements hook_field_formatter_view().
addthis_field_formatter_view in includes/addthis.field.inc
Implements hook_field_formatter_view().

File

includes/addthis.field.inc, line 70
Field related hook implementations for the AddThis-module.

Code

function addthis_render_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
  $element = array();
  $display_type = $display['type'];
  $options = array(
    '#entity_type' => $entity_type,
    '#entity' => $entity,
    '#display' => $display,
  );
  $markup = AddThis::getInstance()
    ->getDisplayMarkup($display_type, $options);
  if (!isset($element[0])) {
    $element[0] = $markup;
  }
  return $element;
}