function certificate_course_node_template_settings in Certificate 7.2
Same name and namespace in other branches
- 8.3 certificate.module \certificate_course_node_template_settings()
- 6.2 certificate.module \certificate_course_node_template_settings()
- 6 certificate.module \certificate_course_node_template_settings()
- 3.x certificate.module \certificate_course_node_template_settings()
Quick get per-node template settings.
1 call to certificate_course_node_template_settings()
- certificate_node_load in ./
certificate.module - Implements hook_node_load().
File
- ./
certificate.module, line 249 - Certificate module.
Code
function certificate_course_node_template_settings($nid) {
$result = db_query("SELECT * FROM {certificate_node} WHERE nid = :nid", array(
':nid' => $nid,
));
$node_template_settings = array();
while ($node_template_setting = $result
->fetch(PDO::FETCH_ASSOC)) {
$node_template_settings[$node_template_setting['mapper']][$node_template_setting['type']] = $node_template_setting['template'];
}
return $node_template_settings;
}