private function buildListQuery(URLListData $data): URLQuery
    {
        $query = new URLQuery();
        $query->sortClauses = [
            new SortClause\URL(),
        ];

        $criteria = [
            new Criterion\VisibleOnly(),
        ];

        if ($data->searchQuery !== null) {
            $criteria[] = new Criterion\Pattern($data->searchQuery);
        }

        if ($data->status !== null) {
            $criteria[] = new Criterion\Validity($data->status);
        }

        $query->filter = new Criterion\LogicalAnd($criteria);

        return $query;
    }
private function buildListQuery(URLListData $data): URLQuery
    {
        $query = new URLQuery();
        $query->sortClauses = [
            new SortClause\URL(),
        ];

        $criteria = [
            new Criterion\VisibleOnly(),
        ];

        if ($data->searchQuery !== null) {
            $criteria[] = new Criterion\Pattern($data->searchQuery);
        }

        if ($data->status !== null) {
            $criteria[] = new Criterion\Validity($data->status);
        }

        $query->filter = new Criterion\LogicalAnd($criteria);

        return $query;
    }
private function buildListQuery ( URLListData $ data ) : URLQuery { $ query = new URLQuery ( ) ; $ query -> sortClauses = [ new SortClause \ URL ( ) , ] ; $ criteria = [ new Criterion \ VisibleOnly ( ) , ] ; if ( $ data -> searchQuery !== null ) { $ criteria [ ] = new Criterion \ Pattern ( $ data -> searchQuery ) ; } if ( $ data -> status !== null ) { $ criteria [ ] = new Criterion \ Validity ( $ data -> status ) ; } $ query -> filter = new Criterion \ LogicalAnd ( $ criteria ) ; return $ query ; }
Builds URL criteria from list data.

@param URLListData $data

@return URLQuery
Builds URL criteria from list data .