PHP Class WelcomePostPlugin, addons

Inheritance: extends Gdn_Plugin
显示文件 Open project: vanilla/addons

Public Methods

Method Description
entryController_registrationSuccessful_handler ( ) Redirect users to the /post/discussion end point after registration.
entryController_render_after ( EntryController $sender ) Redirect users to the /post/discussion end point after email confirmation.
postController_beforeDiscussionRender_handler ( PostController $sender, array $args ) Tweak the discussion form.
postController_render_before ( PostController $sender, array $args ) Add needed resources to the page.
setup ( ) Executed when the plugin is enabled.
structure ( ) Create the target category that is needed for this plugin to work.

Protected Methods

Method Description
isWelcomePostActive ( Gdn_Request $request, integer | boolean &$categoryID ) : boolean Check whether all condition are met for this plugin to do its magic.

Method Details

entryController_registrationSuccessful_handler() public method

Redirect users to the /post/discussion end point after registration.

entryController_render_after() public method

Redirect users to the /post/discussion end point after email confirmation.
public entryController_render_after ( EntryController $sender )
$sender EntryController Sending controller instance.

isWelcomePostActive() protected method

Check whether all condition are met for this plugin to do its magic.
protected isWelcomePostActive ( Gdn_Request $request, integer | boolean &$categoryID ) : boolean
$request Gdn_Request
$categoryID integer | boolean Category ID of the welcome category if it exists and this function return true
return boolean

postController_beforeDiscussionRender_handler() public method

Post in the "welcome" category, prefill title...
public postController_beforeDiscussionRender_handler ( PostController $sender, array $args )
$sender PostController Sending controller instance.
$args array Event's arguments.

postController_render_before() public method

Add needed resources to the page.
public postController_render_before ( PostController $sender, array $args )
$sender PostController Sending controller instance.
$args array Event's arguments.

setup() public method

Executed when the plugin is enabled.
public setup ( )

structure() public method

Create the target category that is needed for this plugin to work.
public structure ( )