FilterDefaultAdapter Class Reference
[Controller]
Default Implementation of Filter adapter. More...
Inheritance diagram for
FilterDefaultAdapter:
Public Member Functions |
|
__construct ($page_data, $param= 'fl') | |
get_current_key ($group_id, $default= '') | |
Return key for given group. |
|
get_filter_link ($filter, $group_id) | |
Build URL for filter. |
|
Static Public Member Functions |
|
static | apply_to_url ($url, $filter, $group_id= '', $parameter= 'fl') |
Prepare URL so filter gets applied. |
|
Protected Attributes |
|
$page_data | |
$param |
Detailed Description
Default Implementation of Filter adapter.
Uses GET-Parameters as filter parameters
Definition at line 99 of file filter.cls.php.
Constructor & Destructor Documentation
FilterDefaultAdapter::__construct | ( | $ | page_data, | |
$ | param = 'fl' |
|||
) |
Definition at line 103 of file filter.cls.php.
00103 { 00104 $this->page_data = $page_data; 00105 $this->param = $param; 00106 }
Member Function Documentation
static FilterDefaultAdapter::apply_to_url | ( | $ | url, | |
$ | filter, | |||
$ | group_id = '' , |
|||
$ | parameter = 'fl' |
|||
) | [static] |
Prepare URL so filter gets applied.
- Returns:
- void
- Deprecated:
- Used function on FilterAdapter instead
Definition at line 131 of file filter.cls.php.
00131 { 00132 $url->replace_query_parameter($parameter . String::plain_ascii($group_id), $filter); 00133 }
FilterDefaultAdapter::get_current_key | ( | $ | group_id, | |
$ | default = '' |
|||
) |
Return key for given group.
- Returns:
- string
Implements IFilterAdapter.
Definition at line 108 of file filter.cls.php.
00108 { 00109 $query_key = 'fl' . String::plain_ascii($group_id); 00110 return $this->page_data->get_get()->get_item($query_key, $default); 00111 }
FilterDefaultAdapter::get_filter_link | ( | $ | filter, | |
$ | group_id | |||
) |
Build URL for filter.
Implements IFilterAdapter.
Definition at line 113 of file filter.cls.php.
00113 { 00114 $key = $filter->is_default() ? '' : $filter->get_key(); 00115 00116 $url = Url::current(); 00117 self::apply_to_url($url, $key, $group_id, $this->param); 00118 return $url->build(Url::RELATIVE); 00119 }
Member Data Documentation
FilterDefaultAdapter::$page_data
[protected] |
Definition at line 101 of file filter.cls.php.
FilterDefaultAdapter::$param
[protected] |
Definition at line 100 of file filter.cls.php.
The documentation for this class was generated from the following file:
- gyro/core/controller/tools/filter.cls.php