function course_get_types in Course 7.2
Same name and namespace in other branches
- 6 course.module \course_get_types()
- 7 course.module \course_get_types()
Get a list of course types.
Return value
array
4 calls to course_get_types()
- course_field_extra_fields in ./
course.module - Implements hook_field_extra_fields().
- course_generate_form in ./
course.devel.inc - Form callback for devel_generate support.
- course_signup_install in modules/
course_signup/ course_signup.install - Implements hook_install().
- views_handler_filter_course::query in views/
handlers/ views_handler_filter_course.inc - Add this filter to the query.
File
- ./
course.module, line 1795 - course.module Core functionality for Courses.
Code
function course_get_types() {
$types =& drupal_static(__FUNCTION__, array());
if (!$types) {
foreach (node_type_get_types() as $type => $info) {
if (variable_get("course_use_{$type}", 0)) {
$types[] = $type;
}
}
}
return $types;
}