PHP Class Ublaboo\DataGrid\Filter\Filter

Inheritance: extends Nette\Object
Show file Open project: ublaboo/datagrid Class Usage Examples

Protected Properties

Property Type Description
$attributes array
$column string | array
$condition_callback callable
$grid Ublaboo\DataGrid\DataGrid
$key string
$name string
$template string
$type string
$value mixed
$value_set boolean

Public Methods

Method Description
__construct ( DataGrid $grid, string $key, string $name, string | array $column )
addAttribute ( string $name, mixed $value )
addAttribute ( string $name, mixed $value ) : static
getAttribtues ( ) : array
getAttributes ( )
getColumn ( ) : string Get filter column
getCondition ( ) : array Get filter condition
getConditionCallback ( ) : callable Get custom filter condition
getKey ( ) : mixed Get filter key
getName ( ) : string Get filter name
getPlaceholder ( ) : string Get html attr placeholder
getTemplate ( ) : string Get filter template path
getType ( ) : string
getValue ( ) : mixed Get filter value
hasConditionCallback ( ) : boolean Tell whether custom condition_callback on filter is set
isValueSet ( ) : boolean Tell whether value has been set in this fitler
setCondition ( callable $condition_callback ) Set custom condition on filter
setPlaceholder ( string $placeholder ) : static Set html attr placeholder
setTemplate ( string $template ) : static Filter may have its own template
setValue ( mixed $value ) : static Set filter value

Protected Methods

Method Description
addAttributes ( BaseControl $input ) : BaseControl

Method Details

__construct() public method

public __construct ( DataGrid $grid, string $key, string $name, string | array $column )
$grid Ublaboo\DataGrid\DataGrid
$key string
$name string
$column string | array

addAttribute() public method

public addAttribute ( string $name, mixed $value )
$name string
$value mixed

addAttribute() public method

public addAttribute ( string $name, mixed $value ) : static
$name string
$value mixed
return static

addAttributes() protected method

protected addAttributes ( BaseControl $input ) : BaseControl
$input Nette\Forms\Controls\BaseControl
return Nette\Forms\Controls\BaseControl

getAttribtues() public method

Deprecation: use getAttributes instead
public getAttribtues ( ) : array
return array

getAttributes() public method

public getAttributes ( )

getColumn() public method

Get filter column
public getColumn ( ) : string
return string

getCondition() public method

Get filter condition
public getCondition ( ) : array
return array

getConditionCallback() public method

Get custom filter condition
public getConditionCallback ( ) : callable
return callable

getKey() public method

Get filter key
public getKey ( ) : mixed
return mixed

getName() public method

Get filter name
public getName ( ) : string
return string

getPlaceholder() public method

Get html attr placeholder
public getPlaceholder ( ) : string
return string

getTemplate() public method

Get filter template path
public getTemplate ( ) : string
return string

getType() public method

public getType ( ) : string
return string

getValue() public method

Get filter value
public getValue ( ) : mixed
return mixed

hasConditionCallback() public method

Tell whether custom condition_callback on filter is set
public hasConditionCallback ( ) : boolean
return boolean

isValueSet() public method

Tell whether value has been set in this fitler
public isValueSet ( ) : boolean
return boolean

setCondition() public method

Set custom condition on filter
public setCondition ( callable $condition_callback )
$condition_callback callable

setPlaceholder() public method

Set html attr placeholder
public setPlaceholder ( string $placeholder ) : static
$placeholder string
return static

setTemplate() public method

Filter may have its own template
public setTemplate ( string $template ) : static
$template string
return static

setValue() public method

Set filter value
public setValue ( mixed $value ) : static
$value mixed
return static

Property Details

$attributes protected property

protected array $attributes
return array

$column protected property

protected string|array $column
return string | array

$condition_callback protected property

protected callable $condition_callback
return callable

$grid protected property

protected DataGrid,Ublaboo\DataGrid $grid
return Ublaboo\DataGrid\DataGrid

$key protected property

protected string $key
return string

$name protected property

protected string $name
return string

$template protected property

protected string $template
return string

$type protected property

protected string $type
return string

$value protected property

protected mixed $value
return mixed

$value_set protected property

protected bool $value_set
return boolean