function _rate_get_template in Rate 7
Same name and namespace in other branches
- 6.2 rate.module \_rate_get_template()
Get a template object by name.
Parameters
string $name:
Return value
object
3 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.
- rate_widget_form_validate in ./
rate.admin.inc - Form validate.
File
- ./
rate.module, line 872 - 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;
}