UrlInvalidator/UrlInvalidatorService.php
protected function getUrlsByDocumentParameter()
    {
        if (count($this->documentParamCache) < 1) {
            return [];
        }

        $urls = [];
        $query = new Query();
        $queryTerms = [];

        foreach ($this->documentParamCache as $param) {
            $queryTerms[$param[0]][] = $param[1];
        }

        foreach ($queryTerms as $field => $values) {
            $termQuery = new TermQuery($field, $values);
            $query->addQuery($termQuery, 'should');
        }

        $limitFilter = new LimitFilter(count($this->documentParamCache));
        $repository = $this->manager->getRepository('MultiModel');
        $search = $repository->createSearch()->addQuery($query)
            ->addFilter($limitFilter);
        $documents = $repository->execute($search);

        // Add all category urls to invalidate.
        foreach ($documents as $document) {
            if (is_array($document->url)) {
                foreach ($document->url as $url) {
                    $urls[] = $url['url'];
                }
            }
        }

        array_walk($urls, [$this, 'addWildcard']);
        $this->addUrls($urls);

        return $urls;
    }
protected function getUrlsByDocumentParameter()
    {
        if (count($this->documentParamCache) < 1) {
            return [];
        }

        $urls = [];
        $query = new Query();
        $queryTerms = [];

        foreach ($this->documentParamCache as $param) {
            $queryTerms[$param[0]][] = $param[1];
        }

        foreach ($queryTerms as $field => $values) {
            $termQuery = new TermQuery($field, $values);
            $query->addQuery($termQuery, 'should');
        }

        $limitFilter = new LimitFilter(count($this->documentParamCache));
        $repository = $this->manager->getRepository('MultiModel');
        $search = $repository->createSearch()->addQuery($query)
            ->addFilter($limitFilter);
        $documents = $repository->execute($search);

        // Add all category urls to invalidate.
        foreach ($documents as $document) {
            if (is_array($document->url)) {
                foreach ($document->url as $url) {
                    $urls[] = $url['url'];
                }
            }
        }

        array_walk($urls, [$this, 'addWildcard']);
        $this->addUrls($urls);

        return $urls;
    }
protected function getUrlsByDocumentParameter ( ) { if ( count ( $ this -> documentParamCache ) < 1 ) { return [ ] ; } $ urls = [ ] ; $ query = new Query ( ) ; $ queryTerms = [ ] ; foreach ( $ this -> documentParamCache as $ param ) { $ queryTerms [ $ param [ 0 ] ] [ ] = $ param [ 1 ] ; } foreach ( $ queryTerms as $ field => $ values ) { $ termQuery = new TermQuery ( $ field , $ values ) ; $ query -> addQuery ( $ termQuery , 'should' ) ; } $ limitFilter = new LimitFilter ( count ( $ this -> documentParamCache ) ) ; $ repository = $ this -> manager -> getRepository ( 'MultiModel' ) ; $ search = $ repository -> createSearch ( ) -> addQuery ( $ query ) -> addFilter ( $ limitFilter ) ; $ documents = $ repository -> execute ( $ search ) ; // Add all category urls to invalidate. foreach ( $ documents as $ document ) { if ( is_array ( $ document -> url ) ) { foreach ( $ document -> url as $ url ) { $ urls [ ] = $ url [ 'url' ] ; } } } array_walk ( $ urls , [ $ this , 'addWildcard' ] ) ; $ this -> addUrls ( $ urls ) ; return $ urls ; }
Returns array of links got by document id.

@return array
Returns array of links got by document id .