function course_set_context in Course 8.2
Same name and namespace in other branches
- 8.3 course.module \course_set_context()
- 6 course.module \course_set_context()
- 7.2 course.module \course_set_context()
- 7 course.module \course_set_context()
- 3.x course.module \course_set_context()
Sets a course context.
Return value
4 calls to course_set_context()
- CourseEventSubscriber::onRequest in src/
EventSubscriber/ CourseEventSubscriber.php - Check if the current node will fulfill an object.
- course_ajaj_fulfullment_check in ./
course.module - Fulfillment check callback.
- course_context in ./
course.module - Course content handler callback.
- course_get_context in ./
course.module - Gets the course context.
File
- ./
course.module, line 859 - course.module Core functionality for Courses.
Code
function course_set_context(Course $course = NULL, $clear = FALSE) {
$stored_course =& drupal_static(__FUNCTION__);
if ($clear) {
$stored_course = NULL;
}
if (!empty($course)) {
$stored_course = $course;
}
return !empty($stored_course) ? $stored_course : NULL;
}