PHP 클래스 DiscussionController, vanilla

저자: azazello
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$CategoryID Unique identifier.
$CommentModel CommentModel
$DiscussionModel DiscussionModel
$Uses Models to include.

공개 메소드들

메소드 설명
__get ( $Name ) : mixed
announce ( integer $DiscussionID = '', $Target = '' ) Allows user to announce or unannounce a discussion.
bookmark ( integer $DiscussionID = null ) Allows user to bookmark or unbookmark a discussion.
close ( integer $DiscussionID = '', boolean $Close = true, $From = 'list' ) Allows user to close or re-open a discussion.
comment ( integer $CommentID ) Display discussion page starting with a particular comment.
delete ( integer $DiscussionID, $Target = '' ) Allows user to delete a discussion.
deleteComment ( integer $CommentID = '', string $TransientKey = '' ) Allows user to delete a comment.
dismissAnnouncement ( integer $DiscussionID = '' ) Allows user to remove announcement.
embed ( integer $DiscussionID = '', string $DiscussionStub = '', integer $Offset = '', integer $Limit = '' ) Alternate version of Index that uses the embed master view.
getNew ( integer $DiscussionID, integer $LastCommentID ) Display comments in a discussion since a particular CommentID.
index ( integer $DiscussionID = '', string $DiscussionStub = '', integer $Page = '' ) Default single discussion display.
initialize ( ) Highlight route & add common JS definitions.
refetchPageInfo ( type $DiscussionID ) Re-fetch a discussion's content based on its foreign url.
sendOptions ( $discussion )
sink ( integer $DiscussionID = '', boolean $Sink = true, $From = 'list' ) Allows user to sink or unsink a discussion.

보호된 메소드들

메소드 설명
_setOpenGraph ( )
redirectDiscussion ( array | object $Discussion ) Redirect to the url specified by the discussion.

메소드 상세

__get() 공개 메소드

public __get ( $Name ) : mixed
$Name
리턴 mixed

_setOpenGraph() 보호된 메소드

protected _setOpenGraph ( )

announce() 공개 메소드

If the discussion isn't announced, this announces it. If it is already announced, this unannounces it. Announced discussions stay at the top of the discussions list regardless of how long ago the last comment was.
부터: 2.0.0
public announce ( integer $DiscussionID = '', $Target = '' )
$DiscussionID integer Unique discussion ID.

bookmark() 공개 메소드

If the discussion isn't bookmarked by the user, this bookmarks it. If it is already bookmarked, this unbookmarks it.
부터: 2.0.0
public bookmark ( integer $DiscussionID = null )
$DiscussionID integer Unique discussion ID.

close() 공개 메소드

If the discussion isn't closed, this closes it. If it is already closed, this re-opens it. Closed discussions may not have new comments added to them.
부터: 2.0.0
public close ( integer $DiscussionID = '', boolean $Close = true, $From = 'list' )
$DiscussionID integer Unique discussion ID.
$Close boolean Whether or not to close the discussion.

comment() 공개 메소드

Display discussion page starting with a particular comment.
부터: 2.0.0
public comment ( integer $CommentID )
$CommentID integer Unique comment ID

delete() 공개 메소드

This is a "hard" delete - it is removed from the database.
부터: 2.0.0
public delete ( integer $DiscussionID, $Target = '' )
$DiscussionID integer Unique discussion ID.

deleteComment() 공개 메소드

If the comment is the only one in the discussion, the discussion will be deleted as well. Users without administrative delete abilities should not be able to delete a comment unless it is a draft. This is a "hard" delete - it is removed from the database.
부터: 2.0.0
public deleteComment ( integer $CommentID = '', string $TransientKey = '' )
$CommentID integer Unique comment ID.
$TransientKey string Single-use hash to prove intent.

dismissAnnouncement() 공개 메소드

Users may remove announcements from being displayed for themselves only. Does not affect what announcements are shown for other users.
부터: 2.0.0
public dismissAnnouncement ( integer $DiscussionID = '' )
$DiscussionID integer Unique discussion ID.

embed() 공개 메소드

Alternate version of Index that uses the embed master view.
public embed ( integer $DiscussionID = '', string $DiscussionStub = '', integer $Offset = '', integer $Limit = '' )
$DiscussionID integer Unique identifier, if discussion has been created.
$DiscussionStub string Deprecated.
$Offset integer
$Limit integer

getNew() 공개 메소드

Display comments in a discussion since a particular CommentID.
부터: 2.0.0
public getNew ( integer $DiscussionID, integer $LastCommentID )
$DiscussionID integer Unique discussion ID
$LastCommentID integer Only shows comments posted after this one

index() 공개 메소드

Default single discussion display.
부터: 2.0.0
public index ( integer $DiscussionID = '', string $DiscussionStub = '', integer $Page = '' )
$DiscussionID integer Unique discussion ID
$DiscussionStub string URL-safe title slug
$Page integer The current page of comments

initialize() 공개 메소드

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

redirectDiscussion() 보호된 메소드

Redirect to the url specified by the discussion.
protected redirectDiscussion ( array | object $Discussion )
$Discussion array | object

refetchPageInfo() 공개 메소드

Re-fetch a discussion's content based on its foreign url.
public refetchPageInfo ( type $DiscussionID )
$DiscussionID type

sendOptions() 공개 메소드

public sendOptions ( $discussion )
$discussion

sink() 공개 메소드

If the discussion isn't sunk, this sinks it. If it is already sunk, this unsinks it. Sunk discussions do not move to the top of the discussion list when a new comment is added.
부터: 2.0.0
public sink ( integer $DiscussionID = '', boolean $Sink = true, $From = 'list' )
$DiscussionID integer Unique discussion ID.
$Sink boolean Whether or not to unsink the discussion.

프로퍼티 상세

$CategoryID 공개적으로 프로퍼티

Unique identifier.
public $CategoryID

$CommentModel 공개적으로 프로퍼티

public CommentModel $CommentModel
리턴 CommentModel

$DiscussionModel 공개적으로 프로퍼티

public DiscussionModel $DiscussionModel
리턴 DiscussionModel

$Uses 공개적으로 프로퍼티

Models to include.
public $Uses