function course_content_course_handlers in Course 6
Same name and namespace in other branches
- 7.2 modules/course_content/course_content.module \course_content_course_handlers()
- 7 modules/course_content/course_content.module \course_content_course_handlers()
Implements hook_course_handlers().
1 call to course_content_course_handlers()
- CourseObjectContent::getNodeTypes in modules/
course_content/ course_content.classes.inc - Return a list of valid node types.
File
- modules/
course_content/ course_content.module, line 20
Code
function course_content_course_handlers() {
$handlers = array();
// Dynamically generate the object handlers.
$handlers['object'] = array();
$types = node_get_types();
foreach ($types as $type => $info) {
if (variable_get("course_content_use_{$type}", 0)) {
$handlers['object'][$type] = array(
'name' => $info->name,
'class' => 'CourseObjectContent',
'description' => t('A node to be used in a course workflow.'),
);
}
}
// Set context handler.
$handlers['context'] = array(
'content' => array(
'callback' => 'course_content_context',
),
);
// Return the handlers array.
return $handlers;
}