\FAA\Obj\SearchFilterDateRangeActive

Class FilterDateRangeActive

Summary

Methods
Properties
Constants
__construct()
ToQuery()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(string  $field_from,string  $field_to,string  $value,boolean  $is_or = false)

Create a date range filter

It filters if the requested item is valid at a certain time

Parameters

string $field_from

The start date field name

string $field_to

The end date field name

string $value

The date start value in format parsable by strtotime()

boolean $is_or

Merge with other filters with or

ToQuery()

ToQuery(): string

Create query

Convert to solr search query like -(-datefrom_dt:[ TO 2017-12-24T15:15:02Z] AND datefrom_dt:[ TO ]) AND -(-dateto_dt:[2017-12-24T15:15:02Z TO ] AND dateto_dt:[ TO ])

Returns

string —

The search query