function _rate_get_template in Rate 6.2
Same name and namespace in other branches
- 7 rate.module \_rate_get_template()
Get a template object by name.
Parameters
string $name:
Return value
object
2 calls to _rate_get_template()
- rate_widget_form in ./
rate.admin.inc - Form for adding and editing widgets.
- rate_widget_form_submit in ./
rate.admin.inc - Form submit handler.
File
- ./
rate.module, line 690 - Rate module
Code
function _rate_get_template($name) {
$templates = array();
foreach (module_implements('rate_templates') as $module) {
if ($module_templates = module_invoke($module, 'rate_templates')) {
$templates = array_merge($module_templates, $templates);
}
}
return isset($templates[$name]) ? $templates[$name] : FALSE;
}