You are here

function course_book_context in Course 6

Course context handler callback.

1 string reference to 'course_book_context'
course_book_course_handlers in modules/course_book/course_book.module
Implements hook_course_handlers().

File

modules/course_book/course_book.module, line 6

Code

function course_book_context() {
  $node = node_load(arg(1));
  if ($node) {
    $bid = !empty($node->book['bid']) ? $node->book['bid'] : $node->nid;
    if ($bid) {
      return array(
        'object_type' => 'book',
        'instance' => $bid,
      );
    }
  }
}