PeriodFilter
        
        extends BaseFilter
    
    
            
            in package
            
        
    
    
    
        
            Description of PeriodFilter
Tags
Table of Contents
- END_DATE_ID = 'end'
 - SELECT_ID = 'period'
 - START_DATE_ID = 'start'
 - $autosubmit : bool
 - Submit form on every filter change.
 - $field : string
 - Field name.
 - $key : string
 - Filter key.
 - $label : string
 - Label to show on this filter.
 - $ordernum : int
 - $readonly : bool
 - $i18n : Translator
 - Translator object.
 - $value : mixed
 - $endDate : DateFilter
 - $select : SelectFilter
 - $startDate : DateFilter
 - $totalnum : int
 - __construct() : mixed
 - getDataBaseWhere() : bool
 - getValue() : mixed
 - Get the filter value
 - name() : string
 - render() : string
 - setValue() : mixed
 - Set value to filter
 - setValueFromRequest() : mixed
 - Set value to filter from form request
 - assets() : mixed
 - Adds assets to the asset manager.
 - onChange() : string
 - readonly() : string
 - setDateAndDisable() : mixed
 - Set date value and disable filter
 - setPeriodToDates() : mixed
 - Calculate dates from period value
 
Constants
END_DATE_ID
    public
        mixed
    END_DATE_ID
    = 'end'
        
        
    
SELECT_ID
    public
        mixed
    SELECT_ID
    = 'period'
        
        
    
START_DATE_ID
    public
        mixed
    START_DATE_ID
    = 'start'
        
        
    
Properties
$autosubmit
Submit form on every filter change.
    public
        bool
    $autosubmit
    
    
    
    
$field
Field name.
    public
        string
    $field
    
    
    
    
$key
Filter key.
    public
        string
    $key
    
    
    
    
$label
Label to show on this filter.
    public
        string
    $label
    
    
    
    
$ordernum
    public
        int
    $ordernum
    
    
    
    
$readonly
    public
        bool
    $readonly
     = false
    
    
    
$i18n
Translator object.
    protected
    static    Translator
    $i18n
    
    
    
    
$value
    protected
        mixed
    $value
    
    
    
    
$endDate
    private
        DateFilter
    $endDate
    
    
    
    
$select
    private
        SelectFilter
    $select
    
    
    
    
$startDate
    private
        DateFilter
    $startDate
    
    
    
    
$totalnum
    private
    static    int
    $totalnum
     = 0
    
    
    
Methods
__construct()
    public
                    __construct(string $key, string $field, string $label[, mixed $dateTime = false ]) : mixed
    
        Parameters
- $key : string
 - $field : string
 - $label : string
 - $dateTime : mixed = false
 
Return values
mixed —getDataBaseWhere()
    public
                    getDataBaseWhere(array<string|int, mixed> &$where) : bool
        
        Parameters
- $where : array<string|int, mixed>
 
Return values
bool —getValue()
Get the filter value
    public
                    getValue([string $option = self::SELECT_ID ]) : mixed
    
        Parameters
- $option : string = self::SELECT_ID
 
Return values
mixed —name()
    public
                    name() : string
    
    
    
        Return values
string —render()
    public
                    render() : string
        
    
    
        Return values
string —setValue()
Set value to filter
    public
                    setValue(mixed $value[, mixed $option = self::SELECT_ID ]) : mixed
    
        Parameters
- $value : mixed
 - $option : mixed = self::SELECT_ID
 
Return values
mixed —setValueFromRequest()
Set value to filter from form request
    public
                    setValueFromRequest(Request &$request) : mixed
    
        Parameters
- $request : Request
 
Return values
mixed —assets()
Adds assets to the asset manager.
    protected
                    assets() : mixed
    
    
    
        Return values
mixed —onChange()
    protected
                    onChange() : string
    
    
    
        Return values
string —readonly()
    protected
                    readonly() : string
    
    
    
        Return values
string —setDateAndDisable()
Set date value and disable filter
    private
                    setDateAndDisable(string $date, string $option) : mixed
    
        Parameters
- $date : string
 - $option : string
 
Return values
mixed —setPeriodToDates()
Calculate dates from period value
    private
                    setPeriodToDates() : mixed