function CourseObjectNode::postSave 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::postSave()
- 8.2 modules/course_content/src/Course/Object/CourseObjectNode.php \Drupal\course_content\Course\Object\CourseObjectNode::postSave()
On object write, set privacy on this node.
Overrides CourseObject::postSave
File
- modules/
course_content/ src/ Course/ Object/ CourseObjectNode.php, line 327
Class
- CourseObjectNode
- A course object that uses a node as a base.
Namespace
Drupal\course_content\Course\ObjectCode
function postSave(EntityStorageInterface $storage, $update = TRUE) {
$privacy_enabled = $this
->hasNodePrivacySupport() && $this
->getOption('private');
$external_node = $this
->getInstanceId() > 0;
if ($privacy_enabled && $external_node) {
\Drupal::entityTypeManager()
->getAccessControlHandler('node')
->resetCache();
}
parent::postSave($storage, $update);
}