PHP Class DiscussionsController, vanilla

Inheritance: extends ProjectController
ファイルを表示 Open project: vanilla/vanilla Class Usage Examples

Public Properties

Property Type Description
$Category Category object. Used to limit which discussions are returned to a particular category.
$CategoryID Unique identifier for category.
$ShowOptions Value indicating if discussion options should be displayed when rendering the discussion view.
$Uses to include.

Protected Properties

Property Type Description
$categoryIDs Limit the discussions to just this list of categories, checked for view permission.

Public Methods

Method Description
bookmarked ( $Page = '0' ) Display discussions the user has bookmarked.
bookmarkedPopin ( )
getCategoryIDs ( ) : array
getCommentCounts ( ) Takes a set of discussion identifiers and returns their comment counts in the same order.
index ( integer $Page = false ) Default all discussions view: chronological by most recent comment.
initialize ( ) Highlight route and include JS, CSS, and modules used by all methods.
mine ( $Page = 'p1' ) Display discussions started by the user.
promoted ( ) Endpoint for the PromotedContentModule's data.
setCategoryIDs ( array $categoryIDs )
sort ( string $Target = '' ) Set user preference for sorting discussions.
table ( integer $Page = '0' ) "Table" layout for discussions. Mimics more traditional forum discussion layout.
unread ( $Page = '0' )
userBookmarkCount ( $UserID = false )

Method Details

bookmarked() public method

Display discussions the user has bookmarked.
Since: 2.0.0
public bookmarked ( $Page = '0' )

bookmarkedPopin() public method

public bookmarkedPopin ( )

getCategoryIDs() public method

public getCategoryIDs ( ) : array
return array

getCommentCounts() public method

Takes a set of discussion identifiers and returns their comment counts in the same order.
public getCommentCounts ( )

index() public method

Default all discussions view: chronological by most recent comment.
Since: 2.0.0
public index ( integer $Page = false )
$Page integer Multiplied by PerPage option to determine offset.

initialize() public method

Always called by dispatcher before controller's requested method.
Since: 2.0.0
public initialize ( )

mine() public method

Display discussions started by the user.
Since: 2.0.0
public mine ( $Page = 'p1' )

promoted() public method

Parameters & values must be lowercase and via GET.
See also: PromotedContentModule
public promoted ( )

setCategoryIDs() public method

public setCategoryIDs ( array $categoryIDs )
$categoryIDs array

sort() public method

Set user preference for sorting discussions.
public sort ( string $Target = '' )
$Target string The target to redirect to.

table() public method

"Table" layout for discussions. Mimics more traditional forum discussion layout.
public table ( integer $Page = '0' )
$Page integer Multiplied by PerPage option to determine offset.

unread() public method

Deprecation: since 2.3
public unread ( $Page = '0' )

userBookmarkCount() public method

public userBookmarkCount ( $UserID = false )

Property Details

$Category public_oe property

Category object. Used to limit which discussions are returned to a particular category.
public $Category

$CategoryID public_oe property

Unique identifier for category.
public $CategoryID

$ShowOptions public_oe property

Value indicating if discussion options should be displayed when rendering the discussion view.
public $ShowOptions

$Uses public_oe property

to include.
public $Uses

$categoryIDs protected_oe property

Limit the discussions to just this list of categories, checked for view permission.
protected $categoryIDs