Explorar o código

#3604 Alerts documentation isn't generating properly

Alex Trofimov %!s(int64=4) %!d(string=hai) anos
pai
achega
c993a08b56
Modificáronse 1 ficheiros con 13 adicións e 18 borrados
  1. 13 18
      inc/classes/BxDolAlerts.php

+ 13 - 18
inc/classes/BxDolAlerts.php

@@ -10,35 +10,30 @@
 bx_import('BxDolDb');
 
 /**
- * Alert/Handler engine.
+ * # Alert/Handler/Hooks engine.
  *
  * Is needed to fire some alert(event) in one place and caught it with a handler somewhere else.
  *
  * Related classes:
  *  BxDolAlertsResponse - abstract class for all response classes.
- *  BxDolAlertsResponseUser - response class to process standard profile related alerts.
  *
- * Example of usage:
- * 1. Fire an alert
+ * ### Example of usage:
+ * 
+ * **First** Fire an alert
  *
  * @code
- * $oZ = new BxDolAlerts('unit_name', 'action', 'object_id', 'sender_id', 'extra_params');
+ * $oZ = new BxDolAlerts('unit_name', 'action', 'object_id', 'sender_id', array('of_extra_params'));
  * $oZ->alert();
  * @endcode
+ * or
+ * @code
+ * bx_alert('unit_name', 'action', 'object_id', 'sender_id', ['extra', 'params']);
+ * @endcode
  *
- * 2. Add handler and caught alert(s) @see BxDolAlertsResponseUser
- *  a. Create Response class extending BxDolAlertsResponse class. It should process all necessary alerts which are passed to it.
- *  b. Register your handler in the database by adding it in `sys_alerts_handlers` table.
- *  c. Associate necessary alerts with the handler by adding them in the `sys_alerts` table.
- *
- *
- * Memberships/ACL:
- * Doesn't depend on user's membership.
- *
- *
- * Alerts:
- * no alerts available
- *
+ * **Second** Add handler and caught alert(s)
+ *  a. Create Response class by extending BxDolAlertsResponse class. It should process all necessary alerts which are passed to it.    
+ *  b. Register your handler in the database by adding it in `sys_alerts_handlers` table.   
+ *  c. Associate necessary alerts with the handler by adding them in the `sys_alerts` table.  
  */
 class BxDolAlerts extends BxDol
 {