PHP 클래스 QnAPlugin, addons

저자: Zach Copley ([email protected])
상속: extends MicroAppPlugin
파일 보기 프로젝트 열기: vanilla/addons

보호된 프로퍼티들

프로퍼티 타입 설명
$Badges boolean | array
$Reactions boolean | array

공개 메소드들

메소드 설명
__construct ( ) QnAPlugin constructor.
_commentOptions ( $sender, integer | string $commentID )
base_addonEnabled_handler ( $sender, array $args ) Trigger reaction or badge creation if those addons are enabled later.
base_afterDiscussionFilters_handler ( $sender ) New Html method of adding to discussion filters.
base_beforeCommentDisplay_handler ( $sender, array $args )
base_beforeDiscussionMeta_handler ( $sender, array $args )
base_commentInfo_handler ( $sender, array $args )
base_discussionOptions_handler ( CommentModel $sender, array $args )
base_discussionTypes_handler ( $sender, array $args )
base_render_before ( $sender, $args ) Add Javascript.
categoriesController_render_before ( CategoriesController $sender ) Add 'Ask a Question' button if using BigButtons.
commentModel_afterSaveComment_handler ( CommentModel $sender, array $args ) Give point(s) to the current user if the right conditions are met.
commentModel_beforeNotification_handler ( CommentModel $sender, array $args )
commentModel_beforeUpdateCommentCount_handler ( CommentModel $sender, array $args )
discussionController_QnAOptions_create ( DiscussionController $sender, string | integer $discussionID = '', string | integer $commentID = '' )
discussionController_QnA_create ( DiscussionController $sender, array $args )
discussionController_afterCommentBody_handler ( DiscussionController $sender, array $args ) Write the accept/reject buttons.
discussionController_afterDiscussion_handler ( DiscussionController $sender, array $args )
discussionController_beforeDiscussionRender_handler ( DiscussionController $sender, array $args ) Modify flow of discussion by pinning accepted answers.
discussionController_commentOptions_handler ( DiscussionController $sender, array $args )
discussionController_render_before ( DiscussionController $sender ) Add 'Ask a Question' button if using BigButtons.
discussionModel_beforeGet_handler ( DiscussionModel $sender, array $args )
discussionModel_beforeSaveDiscussion_handler ( DiscussionModel $sender, array $args )
discussionsController_afterDiscussionTabs_handler ( ) Old Html method of adding to discussion filters.
discussionsController_beforeBuildPager_handler ( DiscussionsController $sender, array $args )
discussionsController_unansweredCount_create ( DiscussionsController $sender, array $args ) Displays the amounts of unanswered questions.
discussionsController_unanswered_create ( DiscussionsController $sender, array $args )
discussionsController_unanswered_render ( DiscussionsController $sender, array $args ) Displays the amounts of unanswered questions.
getUnansweredCount ( ) : integer Return the number of unanswered questions.
messageController_afterGetLocationData_handler ( $sender, $args ) Add 'New Question Form' location to Messages.
notificationsController_beforeInformNotifications_handler ( NotificationsController $sender, array $args ) Notifies the current user when one of his questions have been answered.
postController_afterForms_handler ( PostController $sender ) Add the question form to vanilla's post page.
postController_beforeDiscussionRender_handler ( PostController $sender ) Override the PostController->Discussion() method before render to use our view instead.
postController_question_create ( PostController $sender, $CategoryUrlCode = '' ) Create the new question method on post controller.
recalculateDiscussionQnA ( $discussion )
recalculateUserQnA ( string | integer $userID )
settingsController_QnA_create ( $sender ) Create a method called "QnA" on the SettingController.
setup ( ) Run once on enable.
structure ( ) Database updates.

보호된 메소드들

메소드 설명
_discussionOptions ( $sender, integer | string $discussionID )

메소드 상세

__construct() 공개 메소드

QnAPlugin constructor.
public __construct ( )

_commentOptions() 공개 메소드

public _commentOptions ( $sender, integer | string $commentID )
$sender controller instance.
$commentID integer | string Identifier of the comment.

_discussionOptions() 보호된 메소드

protected _discussionOptions ( $sender, integer | string $discussionID )
$sender controller instance.
$discussionID integer | string Identifier of the discussion.

base_addonEnabled_handler() 공개 메소드

Trigger reaction or badge creation if those addons are enabled later.
public base_addonEnabled_handler ( $sender, array $args )
$sender Sending controller instance.
$args array Event arguments.

base_afterDiscussionFilters_handler() 공개 메소드

New Html method of adding to discussion filters.
public base_afterDiscussionFilters_handler ( $sender )
$sender

base_beforeCommentDisplay_handler() 공개 메소드

public base_beforeCommentDisplay_handler ( $sender, array $args )
$sender Sending controller instance.
$args array Event arguments.

base_beforeDiscussionMeta_handler() 공개 메소드

public base_beforeDiscussionMeta_handler ( $sender, array $args )
$sender Sending controller instance.
$args array Event arguments.

base_commentInfo_handler() 공개 메소드

public base_commentInfo_handler ( $sender, array $args )
$sender Sending controller instance.
$args array Event arguments.

base_discussionOptions_handler() 공개 메소드

public base_discussionOptions_handler ( CommentModel $sender, array $args )
$sender CommentModel Sending controller instance.
$args array Event arguments.

base_discussionTypes_handler() 공개 메소드

public base_discussionTypes_handler ( $sender, array $args )
$sender Sending controller instance.
$args array Event arguments.

base_render_before() 공개 메소드

Add Javascript.
public base_render_before ( $sender, $args )
$sender
$args

categoriesController_render_before() 공개 메소드

Add 'Ask a Question' button if using BigButtons.
public categoriesController_render_before ( CategoriesController $sender )
$sender CategoriesController Sending controller instance.

commentModel_afterSaveComment_handler() 공개 메소드

Give point(s) to the current user if the right conditions are met.
public commentModel_afterSaveComment_handler ( CommentModel $sender, array $args )
$sender CommentModel Sending controller instance.
$args array Event arguments.

commentModel_beforeNotification_handler() 공개 메소드

public commentModel_beforeNotification_handler ( CommentModel $sender, array $args )
$sender CommentModel Sending controller instance.
$args array Event arguments.

commentModel_beforeUpdateCommentCount_handler() 공개 메소드

public commentModel_beforeUpdateCommentCount_handler ( CommentModel $sender, array $args )
$sender CommentModel Sending controller instance.
$args array Event arguments.

discussionController_QnAOptions_create() 공개 메소드

public discussionController_QnAOptions_create ( DiscussionController $sender, string | integer $discussionID = '', string | integer $commentID = '' )
$sender DiscussionController Sending controller instance.
$discussionID string | integer Identifier of the discussion
$commentID string | integer Identifier of the comment.

discussionController_QnA_create() 공개 메소드

public discussionController_QnA_create ( DiscussionController $sender, array $args )
$sender DiscussionController Sending controller instance.
$args array Event arguments.

discussionController_afterCommentBody_handler() 공개 메소드

Write the accept/reject buttons.
public discussionController_afterCommentBody_handler ( DiscussionController $sender, array $args )
$sender DiscussionController Sending controller instance.
$args array Event arguments.

discussionController_afterDiscussion_handler() 공개 메소드

public discussionController_afterDiscussion_handler ( DiscussionController $sender, array $args )
$sender DiscussionController Sending controller instance.
$args array Event arguments.

discussionController_beforeDiscussionRender_handler() 공개 메소드

Modify flow of discussion by pinning accepted answers.
public discussionController_beforeDiscussionRender_handler ( DiscussionController $sender, array $args )
$sender DiscussionController Sending controller instance.
$args array Event arguments.

discussionController_commentOptions_handler() 공개 메소드

public discussionController_commentOptions_handler ( DiscussionController $sender, array $args )
$sender DiscussionController Sending controller instance.
$args array Event arguments.

discussionController_render_before() 공개 메소드

Add 'Ask a Question' button if using BigButtons.
public discussionController_render_before ( DiscussionController $sender )
$sender DiscussionController Sending controller instance.

discussionModel_beforeGet_handler() 공개 메소드

public discussionModel_beforeGet_handler ( DiscussionModel $sender, array $args )
$sender DiscussionModel Sending controller instance.
$args array Event arguments.

discussionModel_beforeSaveDiscussion_handler() 공개 메소드

public discussionModel_beforeSaveDiscussion_handler ( DiscussionModel $sender, array $args )
$sender DiscussionModel Sending controller instance.
$args array Event arguments.

discussionsController_afterDiscussionTabs_handler() 공개 메소드

Old Html method of adding to discussion filters.

discussionsController_beforeBuildPager_handler() 공개 메소드

public discussionsController_beforeBuildPager_handler ( DiscussionsController $sender, array $args )
$sender DiscussionsController Sending controller instance.
$args array Event arguments.

discussionsController_unansweredCount_create() 공개 메소드

Displays the amounts of unanswered questions.
public discussionsController_unansweredCount_create ( DiscussionsController $sender, array $args )
$sender DiscussionsController Sending controller instance.
$args array Event arguments.

discussionsController_unanswered_create() 공개 메소드

public discussionsController_unanswered_create ( DiscussionsController $sender, array $args )
$sender DiscussionsController Sending controller instance.
$args array Event arguments.

discussionsController_unanswered_render() 공개 메소드

Displays the amounts of unanswered questions.
public discussionsController_unanswered_render ( DiscussionsController $sender, array $args )
$sender DiscussionsController Sending controller instance.
$args array Event arguments.

getUnansweredCount() 공개 메소드

Return the number of unanswered questions.
public getUnansweredCount ( ) : integer
리턴 integer

messageController_afterGetLocationData_handler() 공개 메소드

Add 'New Question Form' location to Messages.

notificationsController_beforeInformNotifications_handler() 공개 메소드

Notifies the current user when one of his questions have been answered.
public notificationsController_beforeInformNotifications_handler ( NotificationsController $sender, array $args )
$sender NotificationsController Sending controller instance.
$args array Event arguments.

postController_afterForms_handler() 공개 메소드

Add the question form to vanilla's post page.
public postController_afterForms_handler ( PostController $sender )
$sender PostController Sending controller instance.

postController_beforeDiscussionRender_handler() 공개 메소드

Override the PostController->Discussion() method before render to use our view instead.
public postController_beforeDiscussionRender_handler ( PostController $sender )
$sender PostController Sending controller instance.

postController_question_create() 공개 메소드

Create the new question method on post controller.
public postController_question_create ( PostController $sender, $CategoryUrlCode = '' )
$sender PostController Sending controller instance.

recalculateDiscussionQnA() 공개 메소드

public recalculateDiscussionQnA ( $discussion )
$discussion A discussion.

recalculateUserQnA() 공개 메소드

public recalculateUserQnA ( string | integer $userID )
$userID string | integer User identifier

settingsController_QnA_create() 공개 메소드

Create a method called "QnA" on the SettingController.
public settingsController_QnA_create ( $sender )
$sender Sending controller instance

setup() 공개 메소드

Run once on enable.
public setup ( )

structure() 공개 메소드

Database updates.
public structure ( )

프로퍼티 상세

$Badges 보호되어 있는 프로퍼티

protected bool|array $Badges
리턴 boolean | array

$Reactions 보호되어 있는 프로퍼티

protected bool|array $Reactions
리턴 boolean | array