PHP Class TbExtendedFilter

This widget displays an extra row to the grid is attached to and renders a visual feedback of the filter values used plus an option to save them for later use.
Inheritance: extends CWidget
ファイルを表示 Open project: yinhe/yincart

Public Properties

Property Type Description
$filteredBy the cleaned filter attributes
$grid the grid view the widget is going to be used with
$model the model that works as a filter to the grid
$redirectRoute the route to redirect when saving/removing a filter
$removeFilterVar the ajax variable that is used to check whether to delete a filter from the registry
$saveFilterVar the ajax variable that is used to check whether a filter is to be saved

Protected Properties

Property Type Description
$jsonStorage Component
$registry the name of the json registry to save the value

Public Methods

Method Description
init ( ) ### .init()
registerClientScript ( ) ### .registerClientScript()
run ( ) ### .run()

Protected Methods

Method Description
checkRequestFilters ( ) : boolean ### .checkRequestFilters()
checkRequestRemovalFilter ( ) ### .checkRequestRemovalFilter()
displayExtendedFilterValues ( array $filteredBy ) : string ### .displayExtendedFilterValues()
displaySaveButton ( string $registryKey ) : boolean ### .displaySaveButton()
displaySavedFilters ( string $registryKey ) ### .displaySavedFilters()
generateRegistryItemKey ( ) : null | string ### .generateRegistryItemKey()

Method Details

checkRequestFilters() protected method

Checkes whether there has been send the command to save a filter to the registry and redirects to specified route
protected checkRequestFilters ( ) : boolean
return boolean

checkRequestRemovalFilter() protected method

Checks whether there has been send the command to remove a filter from the registry and redirects to specified route

displayExtendedFilterValues() protected method

Displays the filtered options
protected displayExtendedFilterValues ( array $filteredBy ) : string
$filteredBy array
return string

displaySaveButton() protected method

Displays the save filter button
protected displaySaveButton ( string $registryKey ) : boolean
$registryKey string
return boolean

displaySavedFilters() protected method

displays the saved filters as a dropdown list
protected displaySavedFilters ( string $registryKey )
$registryKey string

generateRegistryItemKey() protected method

Generates a registry item key with the filtered attributes + the grid id
protected generateRegistryItemKey ( ) : null | string
return null | string

init() public method

Widget initialization
public init ( )

registerClientScript() public method

Registers the required

run() public method

Widget's run method
public run ( )

Property Details

$filteredBy public_oe property

the cleaned filter attributes
public $filteredBy

$grid public_oe property

the grid view the widget is going to be used with
public $grid

$jsonStorage protected_oe property

Component
protected $jsonStorage

$model public_oe property

the model that works as a filter to the grid
public $model

$redirectRoute public_oe property

the route to redirect when saving/removing a filter
public $redirectRoute

$registry protected_oe property

the name of the json registry to save the value
protected $registry

$removeFilterVar public_oe property

the ajax variable that is used to check whether to delete a filter from the registry
public $removeFilterVar

$saveFilterVar public_oe property

the ajax variable that is used to check whether a filter is to be saved
public $saveFilterVar