function _forward_build_message_content in Forward 7.3
1 call to _forward_build_message_content()
- forward_form_submit in ./
forward.module - Submit callback function for forward form submit
File
- ./
forward.module, line 1530 - Allows forwarding of entities by email, and provides a record of how often each has been forwarded.
Code
function _forward_build_message_content($entity_type, $entity, $entity_id, $view_mode, $langcode) {
if (variable_get('forward_theme_content', FALSE)) {
$content_array = entity_view($entity_type, array(
$entity_id => $entity,
), $view_mode, $langcode);
}
else {
field_attach_prepare_view($entity_type, array(
$entity_id => $entity,
), $view_mode);
entity_prepare_view($entity_type, array(
$entity_id => $entity,
));
$content_array = field_attach_view($entity_type, $entity, $view_mode, $langcode);
}
$content = render($content_array);
return $content;
}