Document/Repository/ArticleViewDocumentRepository.php
public function findRecent(
        $excludeUuid = null,
        $limit = self::DEFAULT_LIMIT,
        array $types = null,
        $locale = null,
        $webspaceKey = null
    ) {
        $search = $this->createSearch($limit, $types, $locale, $webspaceKey);

        if ($excludeUuid) {
            $search->addQuery(new TermQuery('uuid', $excludeUuid), BoolQuery::MUST_NOT);
        }

        $search->addSort(new FieldSort('authored', FieldSort::DESC));

        return $this->repository->findDocuments($search);
    }
public function findRecent(
        $excludeUuid = null,
        $limit = self::DEFAULT_LIMIT,
        array $types = null,
        $locale = null,
        $webspaceKey = null
    ) {
        $search = $this->createSearch($limit, $types, $locale, $webspaceKey);

        if ($excludeUuid) {
            $search->addQuery(new TermQuery('uuid', $excludeUuid), BoolQuery::MUST_NOT);
        }

        $search->addSort(new FieldSort('authored', FieldSort::DESC));

        return $this->repository->findDocuments($search);
    }
public function findRecent ( $ excludeUuid = null , $ limit = self :: DEFAULT_LIMIT , array $ types = null , $ locale = null , $ webspaceKey = null ) { $ search = $ this -> createSearch ( $ limit , $ types , $ locale , $ webspaceKey ) ; if ( $ excludeUuid ) { $ search -> addQuery ( new TermQuery ( 'uuid' , $ excludeUuid ) , BoolQuery :: MUST_NOT ) ; } $ search -> addSort ( new FieldSort ( 'authored' , FieldSort :: DESC ) ) ; return $ this -> repository -> findDocuments ( $ search ) ; }
Finds recent articles for given parameters sorted by field `authored`.

@param null|string $excludeUuid
@param int $limit
@param null|array $types
@param null|string $locale
@param null|string $webspaceKey

@return DocumentIterator
Finds recent articles for given parameters sorted by field authored .