# Event modifiers

Certain events in HostBill pass parameter to advanced hooks as reference (opens new window) allowing you to modify them. By modifying parameter you can impact data that is handled by HostBill / handled by other hooks / stored in database.

Events that can be modified are marked with [m] this documentation menu

# Sample hook

includes/extend/hooks/myhook.php

<?php
/**
 * after_clientvalidation event is triggered after validation of client details
 * upon form submit/signup. We can use it to add our custom validation
 * and block registration/edit if it fails
 */
HBEventManager::handle('after_clientvalidation',function(&$details) {
    // set $details['status'] to false to block registration/edit:
    $details['status'] = false;
    $details['errors'][] = "Validation failed by hook file";
});
Last Updated: 3/17/2023, 8:40:19 AM