PHP Class Grido\Components\Filters\Filter

Author: Petr Bugyík
Inheritance: extends Grido\Components\Component
Afficher le fichier Open project: o5/grido

Protected Properties

Свойство Type Description
$column array
$condition string
$control Nette\Forms\Controls\BaseControl
$formatValue string
$optional mixed
$where callable
$wrapperPrototype Nette\Utils\Html

Méthodes publiques

Méthode Description
__construct ( Grid $grid, string $name, string $label )
__getCondition ( mixed $value ) : Grido\Components\Filters\Condition | boolean
changeValue ( string $value ) : string Value representation in URI.
getColumn ( ) : array
getCondition ( ) : string
getControl ( ) : BaseControl
getWrapperPrototype ( ) : Nette\Utils\Html Returns wrapper prototype ( html tag).
setColumn ( string $column, string $operator = Condition::OPERATOR_OR ) : Filter Map to database column.
setCondition ( $condition ) : Filter Sets custom condition.
setDefaultValue ( string $value ) : Filter Sets default value.
setFormatValue ( string $format ) : Filter Sets custom format value.
setWhere ( callable $callback ) : Filter Sets custom "sql" where.

Méthodes protégées

Méthode Description
formatValue ( string $value ) : string Format value for database.
getFormControl ( )

Method Details

__construct() public méthode

public __construct ( Grid $grid, string $name, string $label )
$grid Grido\Grid
$name string
$label string

__getCondition() public méthode

public __getCondition ( mixed $value ) : Grido\Components\Filters\Condition | boolean
$value mixed
Résultat Grido\Components\Filters\Condition | boolean

changeValue() public méthode

Value representation in URI.
public changeValue ( string $value ) : string
$value string
Résultat string

formatValue() protected méthode

Format value for database.
protected formatValue ( string $value ) : string
$value string
Résultat string

getColumn() public méthode

public getColumn ( ) : array
Résultat array

getCondition() public méthode

public getCondition ( ) : string
Résultat string

getControl() public méthode

public getControl ( ) : BaseControl
Résultat Nette\Forms\Controls\BaseControl

getFormControl() protected méthode

protected getFormControl ( )

getWrapperPrototype() public méthode

Returns wrapper prototype ( html tag).
public getWrapperPrototype ( ) : Nette\Utils\Html
Résultat Nette\Utils\Html

setColumn() public méthode

Map to database column.
public setColumn ( string $column, string $operator = Condition::OPERATOR_OR ) : Filter
$column string
$operator string
Résultat Filter

setCondition() public méthode

Sets custom condition.
public setCondition ( $condition ) : Filter
$condition
Résultat Filter

setDefaultValue() public méthode

Sets default value.
public setDefaultValue ( string $value ) : Filter
$value string
Résultat Filter

setFormatValue() public méthode

Sets custom format value.
public setFormatValue ( string $format ) : Filter
$format string for example: "%%value%"
Résultat Filter

setWhere() public méthode

Sets custom "sql" where.
public setWhere ( callable $callback ) : Filter
$callback callable function($value, $source) }
Résultat Filter

Property Details

$column protected_oe property

protected array $column
Résultat array

$condition protected_oe property

protected string $condition
Résultat string

$control protected_oe property

protected BaseControl,Nette\Forms\Controls $control
Résultat Nette\Forms\Controls\BaseControl

$formatValue protected_oe property

protected string $formatValue
Résultat string

$optional protected_oe property

protected mixed $optional
Résultat mixed

$where protected_oe property

protected callable $where
Résultat callable

$wrapperPrototype protected_oe property

protected Html,Nette\Utils $wrapperPrototype
Résultat Nette\Utils\Html