You are here

public function CourseEnrollment::postSave in Course 3.x

Same name and namespace in other branches
  1. 8.3 src/Entity/CourseEnrollment.php \Drupal\course\Entity\CourseEnrollment::postSave()
  2. 8.2 src/Entity/CourseEnrollment.php \Drupal\course\Entity\CourseEnrollment::postSave()

Reset enrollment access cache.

Overrides ContentEntityBase::postSave

File

src/Entity/CourseEnrollment.php, line 376

Class

CourseEnrollment
Defines the profile entity class.

Namespace

Drupal\course\Entity

Code

public function postSave(EntityStorageInterface $storage, $update = TRUE) {
  \Drupal::entityTypeManager()
    ->getAccessControlHandler('course')
    ->resetCache();
  \Drupal::entityTypeManager()
    ->getAccessControlHandler('course_object')
    ->resetCache();
}