Свойство | Type | Description | |
---|---|---|---|
$criteria | CDbCriteria | ||
$itemsPerPage | integer | ||
$model | BaseActiveRecord | ||
$request | Request | ||
$searchItems | array | ||
$searchTerms | array |
Méthode | Description | |
---|---|---|
__construct ( BaseActiveRecord $model ) | ||
addActiveFilter ( ) | ||
addSearchItem ( $key, string | array $search = '' ) | Add a search item. | |
getCriteria ( ) : CDbCriteria | ||
getItemsPerPage ( ) : integer | ||
getModel ( ) : BaseActiveRecord | ||
getRequest ( ) : mixed | ||
getSearchItems ( ) : array | ||
getSearchTermForAttribute ( $attribute, string $default = '' ) : string | Retrieves the search term supplied by the user for a given attribute if there was one. | |
initPagination ( ) : CPagination | Inits pagination for the results and returns it. | |
initSearch ( $searchInput ) | ||
retrieveResults ( ) : CActiveRecord[] | Performs the query that has been generated. | |
setCriteria ( CDbCriteria $criteria ) | ||
setItemsPerPage ( integer $itemsPerPage ) | ||
setModel ( BaseActiveRecord $model ) | ||
setRequest ( mixed $request ) | ||
setSearchItems ( array $searchItems ) |
Méthode | Description | |
---|---|---|
addCompare ( CDbCriteria $criteria, $attribute, $value, boolean $sensitive = false, string $operator = 'AND', $exactmatch = false ) | Adds a comparison between a search term and an attribute. | |
generateCriteria ( string | array $attr = 'search' ) | Generates the required Criteria object for the search. | |
relationalAttribute ( CDbCriteria $criteria, string $attribute, string $search ) : string | Takes an attribute name and makes sure appropriate relationships are included. |
protected addCompare ( CDbCriteria $criteria, $attribute, $value, boolean $sensitive = false, string $operator = 'AND', $exactmatch = false ) | ||
$criteria | CDbCriteria | |
$attribute | ||
$value | ||
$sensitive | boolean | |
$operator | string |
public addSearchItem ( $key, string | array $search = '' ) | ||
$key | ||
$search | string | array |
protected generateCriteria ( string | array $attr = 'search' ) | ||
$attr | string | array |
public getSearchTermForAttribute ( $attribute, string $default = '' ) : string | ||
$attribute | ||
$default | string | |
Résultat | string |
public initPagination ( ) : CPagination | ||
Résultat | CPagination |
public retrieveResults ( ) : CActiveRecord[] | ||
Résultat | CActiveRecord[] |
public setItemsPerPage ( integer $itemsPerPage ) | ||
$itemsPerPage | integer |