Property | Type | Description | |
---|---|---|---|
$categoryID | The ID of the category we're in. | ||
$dropdownView | The view of the dropdown module to render. | ||
$filters | The filters to render. | ||
$selectedFilters | The selected filters. | ||
$selectedSort | The selected sort. | ||
$showFilters | Whether to show the filter options in the view. | ||
$showSorts | Whether to show the sorting options in the view. | ||
$sorts | The sorts to render. |
Method | Description | |
---|---|---|
__construct ( integer $categoryID, string $selectedSort = '', array $selectedFilters = [] ) | ||
prepare ( ) : boolean | Checks whether we should even render this whole thing. | |
setDropdownView ( string $dropdownView ) : DiscussionsSortFilterModule | ||
setShowFilters ( $showFilters ) : DiscussionsSortFilterModule | ||
setShowSorts ( $showSorts ) : DiscussionsSortFilterModule | ||
showFilters ( ) : boolean | ||
showSorts ( ) : boolean |
Method | Description | |
---|---|---|
getFilterDropdowns ( ) : array | Returns an array of dropdown menus with the data from the filters array or an array containing an empty string to make it safe for echoing out. | |
getPagelessPath ( ) : string | Returns the current path without any page indicator. Useful for resetting sorting/filtering no matter which page the user is on. | |
getSortData ( ) : array | Returns an array of sanitized sort data for the view. |
protected getFilterDropdowns ( ) : array | ||
return | array | An array of dropdown menus or an array containing an empty string. |
protected getPagelessPath ( ) : string | ||
return | string | The path of the request without the page. |
protected getSortData ( ) : array | ||
return | array | An array of sorts consisting of the name, url, rel and cssClass of each sort item. |
public setDropdownView ( string $dropdownView ) : DiscussionsSortFilterModule | ||
$dropdownView | string | The view of the dropdown module to render. |
return | DiscussionsSortFilterModule | $this |
public setShowFilters ( $showFilters ) : DiscussionsSortFilterModule | ||
$showFilters | Whether to show the filtering options in the view. | |
return | DiscussionsSortFilterModule | $this |
public setShowSorts ( $showSorts ) : DiscussionsSortFilterModule | ||
$showSorts | Whether to show the sorting options in the view. | |
return | DiscussionsSortFilterModule | $this |
public showFilters ( ) : boolean | ||
return | boolean | Whether to show the filtering options in the view. |
protected $dropdownView |
protected $showFilters |
protected $showSorts |