public function CourseObjectBook::freeze in Course 8.2
Same name and namespace in other branches
- 8.3 modules/course_book/src/Plugin/course/CourseObject/CourseObjectBook.php \Drupal\course_book\Plugin\course\CourseObject\CourseObjectBook::freeze()
- 3.x modules/course_book/src/Plugin/course/CourseObject/CourseObjectBook.php \Drupal\course_book\Plugin\course\CourseObject\CourseObjectBook::freeze()
Override of CourseObjectNode::freeze().
Do not freeze the parent book ID.
course_book_node_insert() stumbles if this is set and we are cloning a book.
Overrides CourseObjectNode::freeze
File
- modules/
course_book/ src/ Plugin/ course/ CourseObject/ CourseObjectBook.php, line 195
Class
- CourseObjectBook
- Plugin annotation @CourseObject( id = "book", label = "Book", handlers = { "fulfillment" = "\Drupal\course_book\Plugin\course\CourseObject\CourseObjectBookFulfillment" } )
Namespace
Drupal\course_book\Plugin\course\CourseObjectCode
public function freeze() {
$ice = parent::freeze();
unset($ice->node->book['bid']);
return $ice;
}