Alex Trofimov 2 лет назад
Родитель
Сommit
e45594304c

+ 1 - 5
inc/classes/BxDol.php

@@ -5,17 +5,13 @@
  */
 
 /**
- * @mainpage Index
+ * @mainpage UNA Abstracts
  * - @subpage objects Objects
  * - @subpage service Service Calls
- * - @subpage hooks Alerts(hooks)
- * - @subpage public_api API Public
- * - @subpage private_api API Private
  */
 
 /**
  * @defgroup UnaModules UNA Modules
- *
  * @{
  * @}
  */

+ 5 - 6
inc/profiles.inc.php

@@ -128,15 +128,14 @@ function bx_login($iId, $bRememberMe = false)
     }
 
     /**
-     * @page hooks
-     * @section hooks_system System
-     * @subsection hooks_system-login 'system', 'login' - hook after user performed login
-     * Used in @ref bx_login function
-     * - $unit_name - `system`
-     * - $action - `login` 
+     * @hooks
+     * @hookdef hook-account-login 'account', 'login' - hook after user performed login
+     * - $unit_name - equals `system`
+     * - $action - equals `login` 
      * - $object_id - account id 
      * - $sender_id - not used 
      * - $extra_params - not used
+     * @hook @ref hook-account-login
      */
     bx_alert('account', 'login',  $iId);
 

+ 13 - 14
inc/utils.inc.php

@@ -508,12 +508,10 @@ function _sendMail($sRecipientEmail, $sMailSubject, $sMailBody, $iRecipientID =
     );
     
     /**
-     * @page hooks
-     * @section hooks_system System
-     * @subsection hooks_system-check_send_mail 'system', 'check_send_mail' - hook for disabling mail sending 
-     * Used in @ref sendMail function 
-     * - $unit_name - `system`
-     * - $action - `check_send_mail` 
+     * @hooks
+     * @hookdef hook-system-check_send_mail 'system', 'check_send_mail' - hook for disabling mail sending 
+     * - $unit_name - equals `system`
+     * - $action - equals `check_send_mail` 
      * - $object_id - recipient profile id 
      * - $sender_id - not used 
      * - $extra_params - array of additional params with the following array keys:
@@ -527,6 +525,7 @@ function _sendMail($sRecipientEmail, $sMailSubject, $sMailBody, $iRecipientID =
      *      - `html` - [boolean] `true` if email content is HTML, if `false` then email content is text
      *      - `custom_headers` - [array] custom email headers array as key&value pairs
      *      - `override_result` - [boolean] override result of `sendMail` function, if `true` then mail sending should continue as usual, if `false` then mail sending should stop
+     * @hook @ref hook-system-check_send_mail
      */
     bx_alert('system', 'check_send_mail', (isset($aRecipientInfo['ID']) ? $aRecipientInfo['ID'] : 0), '', $aAlert);
     
@@ -536,10 +535,10 @@ function _sendMail($sRecipientEmail, $sMailSubject, $sMailBody, $iRecipientID =
     // system alert
     if (!$isDisableAlert) {
         /**
-         * @page hooks
-         * @section hooks_system System
-         * @subsection hooks_system-before_send_mail 'system', 'before_send_mail' - hook before mail sending
-         * It's equivalent to @ref hooks_system-check_send_mail 
+         * @hooks
+         * @hookdef hook-system-before_send_mail 'system', 'before_send_mail' - hook before mail sending
+         * It's equivalent to @ref hook-system-check_send_mail 
+         * @hook @ref hook-system-before_send_mail
          */
         bx_alert('system', 'before_send_mail', (isset($aRecipientInfo['ID']) ? $aRecipientInfo['ID'] : 0), '', $aAlert);
         if ($bResult !== null)
@@ -565,11 +564,11 @@ function _sendMail($sRecipientEmail, $sMailSubject, $sMailBody, $iRecipientID =
     // system alert
     if (!$isDisableAlert) {
         /**
-         * @page hooks
-         * @section hooks_system System
-         * @subsection hooks_system-send_mail 'system', 'send_mail' - hook when mail was sent
-         * It's equivalent to @ref hooks_system-check_send_mail 
+         * @hooks
+         * @hookdef hook-system-send_mail 'system', 'send_mail' - hook when mail was sent
+         * It's equivalent to @ref hook-system-check_send_mail 
          * except `override_result` parameter in $extra_params is missing
+         * @hook @ref hook-system-send_mail
          */
         bx_alert('system', 'send_mail', (isset($aRecipientInfo['ID']) ? $aRecipientInfo['ID'] : 0), '', $aAlert);
     }

+ 4 - 5
modules/base/general/classes/BxBaseModGeneralModule.php

@@ -3154,17 +3154,16 @@ class BxBaseModGeneralModule extends BxDolModule
         $aParams = $this->_alertParams($aContentInfo);
 
         /**
-         * @page hooks
-         * @section hooks_bx_base_general "Base General"
-         * @subsection hooks_bx_base_general-approved '{module_name}', 'approved' - hook when module content has been approved
-         * Used in @ref alertAfterApprove "alertAfterApprove" method
+         * @hooks
+         * @hookdef hook-bx_base_general-approved '{module_name}', 'approved' - hook when module content has been approved
          * - $unit_name - module name
-         * - $action - `approved` 
+         * - $action - equals `approved` 
          * - $object_id - content id 
          * - $sender_id - not used, always `false`
          * - $extra_params - array of additional params with the following array keys:
          *      - `source` - [string] uniq string for particular content in the following format `{module}_{content}`
          *      - `object_author_id` - [int] content author profile id
+         * @hook @ref hook-bx_base_general-approved
          */
         bx_alert($sModule, 'approved', $iId, false, $aParams);
     }