public function fromWidgetHtml($name, $defaultTimeWindow = 3600)
    {
        $post = $this->request->request;

        $s = $post->get($name . '_maxRequests');
        $maxRequests = (is_scalar($s) && is_numeric($s)) ? (int) $s : null;
        if ($maxRequests !== null && $maxRequests <= 0) {
            throw new UserMessageException(t('Please specify a positive integer for the maximum number of requests (or leave it empty)'));
        }
        try {
            $timeWindow = $this->joinTimeWindow($post->get($name . '_timeWindow_value'), $post->get($name . '_timeWindow_unit'), true);
        } catch (UserMessageException $x) {
            if ($maxRequests === null) {
                $timeWindow = $defaultTimeWindow;
            } else {
                throw $x;
            }
        }

        return [$maxRequests, $timeWindow];
    }