FileAccess Orion

FilterDateRangeActive extends FilterDateRange
in package

Class FilterDateRangeActive

Tags
category

Interface function

author

Tobias Teichner webmaster@teichner.biz

since

File available since v5.114.0

Table of Contents

$as_timestamp  : bool
$empty  : bool
Allow empty
$field  : mixed
$field_from  : string|null
$field_to  : string|null
$is_or  : bool
Is or filter
$value  : mixed
$value_from  : int|string|null
$value_to  : int|string|null
__construct()  : mixed
Create a date range filter
Field()  : mixed
Get the filed
IsOr()  : bool
Is or connection?
ToQuery()  : string
Create query
ToSqlQuery()  : SqlTerm|array<string|int, SqlTerm>|null
Create a sql query based on this filter

Properties

Methods

__construct()

Create a date range filter

public __construct(string $field_from, string $field_to, string $value[, bool $is_or = false ]) : mixed

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

Parameters
$field_from : string

The start date field name

$field_to : string

The end date field name

$value : string

The date start value in format parsable by strtotime()

$is_or : bool = false

Merge with other filters with or

Return values
mixed

Field()

Get the filed

public Field() : mixed
Return values
mixed

IsOr()

Is or connection?

public IsOr() : bool

When merged with other filter use OR instead of AND

Return values
bool

Is or merge

ToQuery()

Create query

public ToQuery() : string

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 *])

Return values
string

The search query

Search results