function course_book_node_insert in Course 8.3
Same name and namespace in other branches
- 8.2 modules/course_book/course_book.module \course_book_node_insert()
- 7.2 modules/course_book/course_book.module \course_book_node_insert()
- 7 modules/course_book/course_book.module \course_book_node_insert()
- 3.x modules/course_book/course_book.module \course_book_node_insert()
Implements hook_node_insert().
Resave the book course object associated with this book page.
We need to do this so that proper hooks get run to set content access.
File
- modules/
course_book/ course_book.module, line 206
Code
function course_book_node_insert($node) {
if (!empty($node->book['bid']) && $node->book['bid'] != $node
->id()) {
if ($courseObject = course_get_course_object('book', $node->book['bid'])) {
$courseObject
->save();
}
}
}