public static function OpignoGroupContext::removeContext in Opigno group manager 3.x
Same name and namespace in other branches
- 8 src/OpignoGroupContext.php \Drupal\opigno_group_manager\OpignoGroupContext::removeContext()
Remove all the context variables.
Refresh the local actions as well.
File
- src/
OpignoGroupContext.php, line 144
Class
- OpignoGroupContext
- This class manage the context when a user enters or exits a Learning Path.
Namespace
Drupal\opigno_group_managerCode
public static function removeContext() {
static::ensureSession();
/** @var \Drupal\Core\TempStore\PrivateTempStore $store */
$store = \Drupal::service('tempstore.private')
->get('opigno_group_manager');
$store
->delete(self::GROUP_ID);
$store
->delete(self::CURRENT_CONTENT_ID);
$store
->delete(self::ACTIVITY_LINK_TYPE);
self::rebuildActions();
}