function CourseObjectNode::freeze in Course 3.x
Same name and namespace in other branches
- 8.3 modules/course_content/src/Course/Object/CourseObjectNode.php \Drupal\course_content\Course\Object\CourseObjectNode::freeze()
- 8.2 modules/course_content/src/Course/Object/CourseObjectNode.php \Drupal\course_content\Course\Object\CourseObjectNode::freeze()
Freeze data to persist over cloning/exporting.
Return value
array An array of data to be frozen.
Overrides CourseObject::freeze
1 call to CourseObjectNode::freeze()
- CourseObjectBook::freeze in modules/
course_book/ src/ Plugin/ course/ CourseObject/ CourseObjectBook.php - Override of CourseObjectNode::freeze().
1 method overrides CourseObjectNode::freeze()
- CourseObjectBook::freeze in modules/
course_book/ src/ Plugin/ course/ CourseObject/ CourseObjectBook.php - Override of CourseObjectNode::freeze().
File
- modules/
course_content/ src/ Course/ Object/ CourseObjectNode.php, line 342
Class
- CourseObjectNode
- A course object that uses a node as a base.
Namespace
Drupal\course_content\Course\ObjectCode
function freeze() {
if ($this
->getInstanceId() != $this
->getCourse()
->getNode()->nid) {
// Don't freeze the course, if this course is part of the objects.
$ice = new stdClass();
$ice->node = $this
->getNode();
return $ice;
}
}