Bolt\Legacy\Storage::decodePageParameter PHP Method

decodePageParameter() protected method

Decodes contextual page number from current request url if found.
Deprecation: Not used in core anymore
protected decodePageParameter ( string $context = '', array $inParameters = null ) : mixed
$context string Pager id/name in url which value we find
$inParameters array
return mixed Page number in context
    protected function decodePageParameter($context = '', $inParameters = null)
    {
        if (isset($inParameters['page']) && $inParameters['page'] !== null) {
            return $inParameters['page'];
        } else {
            $param = Pager::makeParameterId($context);
            /* @var $query \Symfony\Component\HttpFoundation\ParameterBag */
            $query = $this->app['request']->query;
            $page = $query ? $query->get($param, $query->get('page', 1)) : 1;
        }
        return $page;
    }