src/Sulu/Bundle/SnippetBundle/Snippet/SnippetRepository.php
public function getSnippets(
        $locale,
        $type = null,
        $offset = null,
        $max = null,
        $search = null,
        $sortBy = null,
        $sortOrder = null
    ) {
        $query = $this->getSnippetsQuery($locale, $type, $offset, $max, $search, $sortBy, $sortOrder);
        $documents = $this->documentManager->createQuery($query, $locale, [
            'load_ghost_content' => true,
        ])->execute();

        return $documents;
    }
public function getSnippets(
        $locale,
        $type = null,
        $offset = null,
        $max = null,
        $search = null,
        $sortBy = null,
        $sortOrder = null
    ) {
        $query = $this->getSnippetsQuery($locale, $type, $offset, $max, $search, $sortBy, $sortOrder);
        $documents = $this->documentManager->createQuery($query, $locale, [
            'load_ghost_content' => true,
        ])->execute();

        return $documents;
    }
public function getSnippets ( $ locale , $ type = null , $ offset = null , $ max = null , $ search = null , $ sortBy = null , $ sortOrder = null ) { $ query = $ this -> getSnippetsQuery ( $ locale , $ type , $ offset , $ max , $ search , $ sortBy , $ sortOrder ) ; $ documents = $ this -> documentManager -> createQuery ( $ query , $ locale , [ 'load_ghost_content' => true , ] ) -> execute ( ) ; return $ documents ; }
Return snippets.

If $type is given then only return the snippets of that type.

@param string $locale
@param string $type Optional snippet type
@param int $offset Optional offset
@param int $max Optional max
@param string $search
@param string $sortBy
@param string $sortOrder

@throws \InvalidArgumentException

@return SnippetDocument[]
Return snippets .