FilterDateRangeActive
        
        extends FilterDateRange
    
    
            
            in package
            
        
    
    
    
        
            Class FilterDateRangeActive
Tags
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
 - value() : mixed
 
Properties
$as_timestamp
    protected
        bool
    $as_timestamp
    
    
    
    
$empty
Allow empty
    protected
        bool
    $empty
     = false
    
    
    
$field
    protected
        mixed
    $field
    
    
    
    
$field_from
    protected
        string|null
    $field_from
     = null
    
    
    
$field_to
    protected
        string|null
    $field_to
     = null
    
    
    
$is_or
Is or filter
    protected
        bool
    $is_or
     = false
    
    
    
$value
    protected
        mixed
    $value
    
    
    
    
$value_from
    protected
        int|string|null
    $value_from
     = null
    
    
    
$value_to
    protected
        int|string|null
    $value_to
     = null
    
    
    
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
ToSqlQuery()
Create a sql query based on this filter
    public
                    ToSqlQuery() : SqlTerm|array<string|int, SqlTerm>|null
    
    
    
        Return values
SqlTerm|array<string|int, SqlTerm>|null —value()
    protected
                    value(mixed $entity) : mixed
    
        Parameters
- $entity : mixed