function sexybookmarks_field_formatter_view in Share Buttons, Related Posts, Content Analytics - Shareaholic 7
Same name and namespace in other branches
- 7.2 includes/field_ui.inc \sexybookmarks_field_formatter_view()
Implements hook_field_formatter_view().
File
- includes/
field_ui.inc, line 26 - Field UI module integration.
Code
function sexybookmarks_field_formatter_view($entity_type, $entity, $field, $instance, $langcode, $items, $display) {
$element = array();
$info = module_invoke_all('sexybookmarks_field_formatter_info');
if (!empty($display['settings']['sexybookmarks_profile']) && isset($info[$field['type']]) && isset($info[$field['type']]['callback']) && function_exists($info[$field['type']]['callback'])) {
foreach ($items as $delta => $item) {
$data = $info[$field['type']]['callback']($item);
$element[$delta] = array(
'#theme' => 'sexybookmarks',
'#url' => $data['url'],
'#title' => $data['title'],
'#profile' => $display['settings']['sexybookmarks_profile'],
);
}
}
return $element;
}