src/Sulu/Bundle/SnippetBundle/Snippet/SnippetRepository.php
public function getSnippetsByUuids(array $uuids, $locale, $loadGhostContent = false)
    {
        $snippets = [];

        foreach ($uuids as $uuid) {
            try {
                $snippet = $this->documentManager->find($uuid, $locale, [
                    'load_ghost_content' => $loadGhostContent,
                ]);
                $snippets[] = $snippet;
            } catch (DocumentNotFoundException $e) {
                // ignore not found items
            }
        }

        return $snippets;
    }
public function getSnippetsByUuids(array $uuids, $locale, $loadGhostContent = false)
    {
        $snippets = [];

        foreach ($uuids as $uuid) {
            try {
                $snippet = $this->documentManager->find($uuid, $locale, [
                    'load_ghost_content' => $loadGhostContent,
                ]);
                $snippets[] = $snippet;
            } catch (DocumentNotFoundException $e) {
                // ignore not found items
            }
        }

        return $snippets;
    }
public function getSnippetsByUuids ( array $ uuids , $ locale , $ loadGhostContent = false ) { $ snippets = [ ] ; foreach ( $ uuids as $ uuid ) { try { $ snippet = $ this -> documentManager -> find ( $ uuid , $ locale , [ 'load_ghost_content' => $ loadGhostContent , ] ) ; $ snippets [ ] = $ snippet ; } catch ( DocumentNotFoundException $ e ) { // ignore not found items } } return $ snippets ; }
Return snippets identified by the given UUIDs.

UUIDs which fail to resolve to a snippet will be ignored.

@param array $uuids
@param string $locale
@param bool $loadGhostContent

@return SnippetDocument
Return snippets identified by the given UUIDs .