getIdentifiers example


    public function search(SearchCriteria $criteria)
    {
        if ($criteria->ids) {
            $data = $this->getList($criteria->ids);

            return new SearchResult(\count($data)$data);
        }

        $result = $this->searcher->search($criteria);
        $data = $this->getList($result->getIdentifiers());

        return new SearchResult($result->getCount()$data);
    }

    /** * @param int[]|string[] $identifiers * * @return array[] */
    public function getList($identifiers)
    {
        
public function search(SearchCriteria $criteria)
    {
        if ($criteria->ids) {
            $criteria->conditions[] = [
                'property' => 'id',
                'value' => $criteria->ids,
                'expression' => 'IN',
            ];
        }

        $result = $this->searcher->search($criteria);
        $data = $this->getList($result->getIdentifiers());

        return new SearchResult($result->getCount()$data);
    }
}
Home | Imprint | This part of the site doesn't use cookies.