PHP 클래스 PostController, vanilla

상속: extends AppController
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$DiscussionModel DiscussionModel
$Form Gdn_Form
$FormCollection An associative array of form types and their locations.
$ShowCategorySelector Whether or not to show the category dropdown.
$Uses Models to include.

공개 메소드들

메소드 설명
announceOptions ( ) : array Get available announcement options for discussions.
comment ( integer $DiscussionID = '' ) Create or update a comment.
comment2 ( integer $CommentID, boolean $Inserted = false ) Triggers saving the extra info about a comment like notifications and unread totals.
discussion ( $CategoryUrlCode = '' ) Create or update a discussion.
editComment ( integer $CommentID = '', integer $DraftID = '' ) Edit a comment (wrapper for PostController::Comment).
editDiscussion ( integer $DiscussionID = '', integer $DraftID = '' ) Edit a discussion (wrapper for PostController::Discussion).
index ( $CurrentFormName = 'discussion' ) General "post" form, allows posting of any kind of form. Attach to PostController_AfterFormCollection_Handler.
initialize ( ) Include CSS for all methods.
notifyNewDiscussion ( $DiscussionID )

보호된 메소드들

메소드 설명
populateForm ( Gdn_Form $Form ) Pre-populate the form with values from the query string.

메소드 상세

announceOptions() 공개 메소드

Get available announcement options for discussions.
부터: 2.1
public announceOptions ( ) : array
리턴 array

comment() 공개 메소드

Create or update a comment.
부터: 2.0.0
public comment ( integer $DiscussionID = '' )
$DiscussionID integer Unique ID to add the comment to. If blank, this method will throw an error.

comment2() 공개 메소드

Triggers saving the extra info about a comment like notifications and unread totals.
부터: 2.0.?
public comment2 ( integer $CommentID, boolean $Inserted = false )
$CommentID integer Unique ID of the comment.
$Inserted boolean

discussion() 공개 메소드

Create or update a discussion.
부터: 2.0.0
public discussion ( $CategoryUrlCode = '' )

editComment() 공개 메소드

Will throw an error if both params are blank.
부터: 2.0.0
public editComment ( integer $CommentID = '', integer $DraftID = '' )
$CommentID integer Unique ID of the comment to edit.
$DraftID integer Unique ID of the draft to edit.

editDiscussion() 공개 메소드

Will throw an error if both params are blank.
부터: 2.0.0
public editDiscussion ( integer $DiscussionID = '', integer $DraftID = '' )
$DiscussionID integer Unique ID of the discussion to edit.
$DraftID integer Unique ID of draft discussion to edit.

index() 공개 메소드

General "post" form, allows posting of any kind of form. Attach to PostController_AfterFormCollection_Handler.
부터: 2.0.0
public index ( $CurrentFormName = 'discussion' )

initialize() 공개 메소드

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

notifyNewDiscussion() 공개 메소드

public notifyNewDiscussion ( $DiscussionID )

populateForm() 보호된 메소드

Pre-populate the form with values from the query string.
protected populateForm ( Gdn_Form $Form )
$Form Gdn_Form

프로퍼티 상세

$DiscussionModel 공개적으로 프로퍼티

public DiscussionModel $DiscussionModel
리턴 DiscussionModel

$Form 공개적으로 프로퍼티

public Gdn_Form $Form
리턴 Gdn_Form

$FormCollection 공개적으로 프로퍼티

An associative array of form types and their locations.
public $FormCollection

$ShowCategorySelector 공개적으로 프로퍼티

Whether or not to show the category dropdown.
public $ShowCategorySelector

$Uses 공개적으로 프로퍼티

Models to include.
public $Uses