bundle/ContextProvider/UserContextProvider.php
public function updateUserContext(UserContext $context): void
    {
        $context->addParameter(
            'userId',
            $this->repository->getPermissionResolver()->getCurrentUserReference()->getUserId()
        );
    }
public function updateUserContext(UserContext $context): void
    {
        $context->addParameter(
            'userId',
            $this->repository->getPermissionResolver()->getCurrentUserReference()->getUserId()
        );
    }
public function updateUserContext ( UserContext $ context ) : void { $ context -> addParameter ( 'userId' , $ this -> repository -> getPermissionResolver ( ) -> getCurrentUserReference ( ) -> getUserId ( ) ) ; }
Adds the current user ID to the user context. Allows varying the caches
per user, without taking into the account session for example.
Adds the current user ID to the user context . Allows varying the caches per user without taking into the account session for example .