function fft_render in Field Formatter Template 7
Same name and namespace in other branches
- 8.2 fft.module \fft_render()
- 8 fft.module \fft_render()
Render template with variables.
Parameters
string $template_file: Template name.
array $variables: Variables for template.
Return value
string Rendered template.
1 call to fft_render()
- fft_field_formatter_view in ./
fft.module - Implements hook_field_formatter_view().
File
- ./
fft.module, line 382 - Field formatter template.
Code
function fft_render($template_file, $variables) {
if (!is_file($template_file)) {
return "";
}
$render_fn = function_exists('phptemplate_render_template') ? 'phptemplate_render_template' : 'theme_render_template';
return $render_fn($template_file, $variables);
}