PHP Класс 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.
Наследование: extends CWidget
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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)

Свойство Тип Описание
$jsonStorage Component
$registry the name of the json registry to save the value

Открытые методы

Метод Описание
init ( ) ### .init()
registerClientScript ( ) ### .registerClientScript()
run ( ) ### .run()

Защищенные методы

Метод Описание
checkRequestFilters ( ) : boolean ### .checkRequestFilters()
checkRequestRemovalFilter ( ) ### .checkRequestRemovalFilter()
displayExtendedFilterValues ( array $filteredBy ) : string ### .displayExtendedFilterValues()
displaySaveButton ( string $registryKey ) : boolean ### .displaySaveButton()
displaySavedFilters ( string $registryKey ) ### .displaySavedFilters()
generateRegistryItemKey ( ) : null | string ### .generateRegistryItemKey()

Описание методов

checkRequestFilters() защищенный Метод

Checkes whether there has been send the command to save a filter to the registry and redirects to specified route
protected checkRequestFilters ( ) : boolean
Результат boolean

checkRequestRemovalFilter() защищенный Метод

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

displayExtendedFilterValues() защищенный Метод

Displays the filtered options
protected displayExtendedFilterValues ( array $filteredBy ) : string
$filteredBy array
Результат string

displaySaveButton() защищенный Метод

Displays the save filter button
protected displaySaveButton ( string $registryKey ) : boolean
$registryKey string
Результат boolean

displaySavedFilters() защищенный Метод

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

generateRegistryItemKey() защищенный Метод

Generates a registry item key with the filtered attributes + the grid id
protected generateRegistryItemKey ( ) : null | string
Результат null | string

init() публичный Метод

Widget initialization
public init ( )

registerClientScript() публичный Метод

Registers the required

run() публичный Метод

Widget's run method
public run ( )

Описание свойств

$filteredBy публичное свойство

the cleaned filter attributes
public $filteredBy

$grid публичное свойство

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

$jsonStorage защищенное свойство

Component
protected $jsonStorage

$model публичное свойство

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

$redirectRoute публичное свойство

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

$registry защищенное свойство

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

$removeFilterVar публичное свойство

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

$saveFilterVar публичное свойство

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