PHP Class RoleTitlePlugin, addons

Inheritance: extends Gdn_Plugin
Mostrar archivo Open project: vanilla/addons

Public Methods

Method Description
base_beforeCommentForm_handler ( object $sender, array $args ) Add the roles to the comment form
discussionController_authorInfo_handler ( DiscussionController $sender, array $args ) Inject roles into authorInfo
discussionController_beforeCommentDisplay_handler ( DiscussionController $sender, array $args ) Inject css classes into the comment containers.
discussionController_render_before ( DiscussionController $sender, array $args ) Add the user's roles to the comment data so we can visually identify different roles in the view.
postController_beforeCommentDisplay_handler ( PostController $sender, array $args ) Inject css classes into the comment containers.
postController_render_before ( PostController $sender, array $args )
profileController_render_before ( ProfileController $sender, array $args ) Add the roles to the profile body tag

Private Methods

Method Description
formatRoleCss ( string $rawRole ) : string Generate a valid css class from a role name.
injectCssClass ( stdclass $target, string &$cssClass ) Add role(s) CSS classes to the target.

Method Details

base_beforeCommentForm_handler() public method

Add the roles to the comment form
public base_beforeCommentForm_handler ( object $sender, array $args )
$sender object Sending controller instance.
$args array Event arguments.

discussionController_authorInfo_handler() public method

Inject roles into authorInfo
public discussionController_authorInfo_handler ( DiscussionController $sender, array $args )
$sender DiscussionController Sending controller instance.
$args array Event arguments.

discussionController_beforeCommentDisplay_handler() public method

Inject css classes into the comment containers.
public discussionController_beforeCommentDisplay_handler ( DiscussionController $sender, array $args )
$sender DiscussionController Sending controller instance.
$args array Event arguments.

discussionController_render_before() public method

Add the user's roles to the comment data so we can visually identify different roles in the view.
public discussionController_render_before ( DiscussionController $sender, array $args )
$sender DiscussionController Sending controller instance.
$args array Event arguments.

postController_beforeCommentDisplay_handler() public method

Inject css classes into the comment containers.
public postController_beforeCommentDisplay_handler ( PostController $sender, array $args )
$sender PostController Sending controller instance.
$args array Event arguments.

postController_render_before() public method

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

profileController_render_before() public method

Add the roles to the profile body tag
public profileController_render_before ( ProfileController $sender, array $args )
$sender ProfileController Sending controller instance.
$args array Event arguments.