public function CourseObjectBook::overrideNavigation in Course 7
Same name and namespace in other branches
- 6 modules/course_book/course_book.classes.inc \CourseObjectBook::overrideNavigation()
- 7.2 modules/course_book/course_book.classes.inc \CourseObjectBook::overrideNavigation()
Overrides navigation links.
Overrides CourseObject::overrideNavigation
File
- modules/
course_book/ course_book.classes.inc, line 102
Class
Code
public function overrideNavigation() {
$links = parent::overrideNavigation();
$node = node_load(arg(1));
if (isset($node->book)) {
$book_link = $node->book;
if ($prev = book_prev($book_link)) {
$links['prev'] = l(t('Previous'), $prev['href']);
}
if ($next = book_next($book_link)) {
$links['next'] = l(t('Next'), $next['href']);
}
}
return $links;
}