PHP Class VanillaHooks, vanilla

Inheritance: implements Gdn_IPlugin
ファイルを表示 Open project: vanilla/vanilla

Public Methods

Method Description
base_render_before ( Gdn_Controller $sender ) Adds 'Discussion' item to menu.
dashboardNavModule_init_handler ( DashboardNavModule $sender ) Adds items to Dashboard menu.
dbaController_countJobs_handler ( DbaController $Sender ) Counter rebuilding.
deleteUserData ( integer $userID, array $options = [], &$data = null ) Delete all of the Vanilla related information for a specific user.
discussionController_beforeCommentBody_handler ( $sender )
gdn_statistics_tick_handler ( $Sender, $Args ) Discussion view counter.
permissionModel_defaultPermissions_handler ( PermissionModel $Sender ) Provide default permissions for roles, based on the value in their Type column.
profileController_CustomNotificationPreferences_Handler ( ProfileController $Sender ) Add the advanced notifications view to profiles.
profileController_addProfileTabs_handler ( object $Sender ) Adds 'Discussions' tab to profiles and adds CSS & JS files to their head.
profileController_afterPreferencesDefined_handler ( ProfileController $Sender ) Adds email notification options to profiles.
profileController_comments_create ( ProfileController $Sender, $UserReference = '', $Username = '', $Page = '', $UserID = '' ) Creates virtual 'Comments' method in ProfileController.
profileController_discussions_create ( ProfileController $Sender, $UserReference = '', $Username = '', $Page = '', $UserID = '' ) Creates virtual 'Discussions' method in ProfileController.
searchModel_Search_Handler ( object $Sender ) Add the discussion search to the search.
settingsController_defineAdminPermissions_handler ( object $Sender ) Makes sure forum administrators can see the dashboard admin pages.
setup ( ) Automatically executed when application is enabled.
siteNavModule_init_handler ( NavModule $sender )
userModel_beforeDeleteUser_handler ( UserModel $Sender ) Remove Vanilla data when deleting a user.
userModel_getCategoryViewPermission_create ( $Sender ) : boolean Check whether a user has access to view discussions in a particular category.

Method Details

base_render_before() public method

'base_render_before' will trigger before every pageload across apps. If you abuse this hook, Tim will throw a Coke can at your head.
Since: 2.0.0
public base_render_before ( Gdn_Controller $sender )
$sender Gdn_Controller The sending controller object.

dashboardNavModule_init_handler() public method

Adds items to Dashboard menu.
Since: 2.0.0
public dashboardNavModule_init_handler ( DashboardNavModule $sender )
$sender DashboardNavModule

dbaController_countJobs_handler() public method

Counter rebuilding.
public dbaController_countJobs_handler ( DbaController $Sender )
$Sender DbaController

deleteUserData() public method

Delete all of the Vanilla related information for a specific user.
Since: 2.1
public deleteUserData ( integer $userID, array $options = [], &$data = null )
$userID integer The ID of the user to delete.
$options array An array of options: - DeleteMethod: One of delete, wipe, or NULL

discussionController_beforeCommentBody_handler() public method

gdn_statistics_tick_handler() public method

Discussion view counter.
public gdn_statistics_tick_handler ( $Sender, $Args )
$Sender
$Args

permissionModel_defaultPermissions_handler() public method

Provide default permissions for roles, based on the value in their Type column.
public permissionModel_defaultPermissions_handler ( PermissionModel $Sender )
$Sender PermissionModel Instance of permission model that fired the event

profileController_CustomNotificationPreferences_Handler() public method

Add the advanced notifications view to profiles.
public profileController_CustomNotificationPreferences_Handler ( ProfileController $Sender )
$Sender ProfileController

profileController_addProfileTabs_handler() public method

Adds 'Discussions' tab to profiles and adds CSS & JS files to their head.
Since: 2.0.0
public profileController_addProfileTabs_handler ( object $Sender )
$Sender object ProfileController.

profileController_afterPreferencesDefined_handler() public method

Adds email notification options to profiles.
Since: 2.0.0
public profileController_afterPreferencesDefined_handler ( ProfileController $Sender )
$Sender ProfileController

profileController_comments_create() public method

Creates virtual 'Comments' method in ProfileController.
Since: 2.0.0
public profileController_comments_create ( ProfileController $Sender, $UserReference = '', $Username = '', $Page = '', $UserID = '' )
$Sender ProfileController ProfileController.

profileController_discussions_create() public method

Creates virtual 'Discussions' method in ProfileController.
Since: 2.0.0
public profileController_discussions_create ( ProfileController $Sender, $UserReference = '', $Username = '', $Page = '', $UserID = '' )
$Sender ProfileController ProfileController.

searchModel_Search_Handler() public method

Add the discussion search to the search.
Since: 2.0.0
public searchModel_Search_Handler ( object $Sender )
$Sender object SearchModel

settingsController_defineAdminPermissions_handler() public method

Makes sure forum administrators can see the dashboard admin pages.
Since: 2.0.0
public settingsController_defineAdminPermissions_handler ( object $Sender )
$Sender object SettingsController.

setup() public method

Automatically executed when application is enabled.
Since: 2.0.0
public setup ( )

siteNavModule_init_handler() public method

public siteNavModule_init_handler ( NavModule $sender )
$sender NavModule

userModel_beforeDeleteUser_handler() public method

Remove Vanilla data when deleting a user.
Since: 2.0.0
public userModel_beforeDeleteUser_handler ( UserModel $Sender )
$Sender UserModel UserModel.

userModel_getCategoryViewPermission_create() public method

Check whether a user has access to view discussions in a particular category.
Since: 2.0.18
public userModel_getCategoryViewPermission_create ( $Sender ) : boolean
$Sender UserModel.
return boolean Whether user has permission.