public function getBackendUsername(): ?string
    {
        $token = $this->getToken(BackendUser::SECURITY_SESSION_KEY);

        if (null === $token || !$token->getUser() instanceof BackendUser) {
            return null;
        }

        return $token->getUser()->getUsername();
    }