protected function getContent($contentTypeSlug, array $contentParameters, ListingOptions $options)
    {
        $contentParameters = array_filter($contentParameters);
        $records = $this->query->getContent($contentTypeSlug, $contentParameters);
        if ($records === null && $options->getPage() !== null) {
            $contentParameters['page'] = $options->getPreviousPage();
            $records = $this->query->getContent($contentTypeSlug, $contentParameters);
        }
        $this->runPagerQueries($records);
        if ($options->getGroupSort() && !$options->getOrder()) {
            $records = $this->runGroupSort($records);
        }

        return $records;
    }
protected function getContent($contentTypeSlug, array $contentParameters, ListingOptions $options)
    {
        $contentParameters = array_filter($contentParameters);
        $records = $this->query->getContent($contentTypeSlug, $contentParameters);
        if ($records === null && $options->getPage() !== null) {
            $contentParameters['page'] = $options->getPreviousPage();
            $records = $this->query->getContent($contentTypeSlug, $contentParameters);
        }
        $this->runPagerQueries($records);
        if ($options->getGroupSort() && !$options->getOrder()) {
            $records = $this->runGroupSort($records);
        }

        return $records;
    }
protected function getContent ( $ contentTypeSlug , array $ contentParameters , ListingOptions $ options ) { $ contentParameters = array_filter ( $ contentParameters ) ; $ records = $ this -> query -> getContent ( $ contentTypeSlug , $ contentParameters ) ; if ( $ records === null && $ options -> getPage ( ) !== null ) { $ contentParameters [ 'page' ] = $ options -> getPreviousPage ( ) ; $ records = $ this -> query -> getContent ( $ contentTypeSlug , $ contentParameters ) ; } $ this -> runPagerQueries ( $ records ) ; if ( $ options -> getGroupSort ( ) && ! $ options -> getOrder ( ) ) { $ records = $ this -> runGroupSort ( $ records ) ; } return $ records ; }
Get the content records, and fallback a page if none found.

@param string         $contentTypeSlug
@param array          $contentParameters
@param ListingOptions $options

@return Content|false
Get the content records and fallback a page if none found .