roman.lesnikov@gmail.com 2 лет назад
Родитель
Сommit
7f15310b23

+ 29 - 0
modules/boonex/albums/classes/BxAlbumsFormEntry.php

@@ -47,6 +47,21 @@ class BxAlbumsFormEntry extends BxBaseModTextFormEntry
             $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
             $iProfileId = $this->getContentOwnerProfileId($iContentId);
 
+             /**
+             * @hooks
+             * @hookdef hook-bx_albums-medias_added 'bx_albums', 'medias_added' - hook on new medias added in album
+             * - $unit_name - equals `bx_albums`
+             * - $action - equals `medias_added` 
+             * - $object_id - album_id
+             * - $sender_id - author's profile_id
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `object_author_id` - [int] confirmation type can be none/phone/email/email_and_phone/email_or_phone
+             *      - `subobjects_ids` - [array] array of ids for added media's
+             *      - `medias_added` - [array] array of ids for added media's
+             *      - `privacy_view` - [string] privacy view value for current album
+             *      - `cf` - [int] content filter id
+             * @hook @ref hook-bx_albums-medias_added
+             */
             bx_alert($this->_oModule->getName(), 'medias_added', $iContentId, $iProfileId, [
                 'object_author_id' => $iProfileId,
 
@@ -88,6 +103,20 @@ class BxAlbumsFormEntry extends BxBaseModTextFormEntry
 		        $oMetatags->keywordsAddOne($aMediaInfo['id'], $oMetatags->keywordsCameraModel($aExif));
 			}
         }
+        /**
+         * @hooks
+         * @hookdef hook-bx_albums-media_added 'bx_albums', 'media_added' - hook on new media added in album
+         * - $unit_name - equals `bx_albums`
+         * - $action - equals `media_added` 
+         * - $object_id - album_id
+         * - $sender_id - author's profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] confirmation type can be none/phone/email/email_and_phone/email_or_phone
+         *      - `subobject_id` - [int] id for added media
+         *      - `media_id` - [int] id for added media
+         *      - `media_info` - [array] media info
+         * @hook @ref hook-bx_albums-media_added
+         */
         bx_alert($this->_oModule->getName(), 'media_added', $iContentId, $iProfileId, array(
             'object_author_id' => $aContentInfo[$CNF['FIELD_AUTHOR']],
 

+ 15 - 0
modules/boonex/albums/classes/BxAlbumsModule.php

@@ -125,6 +125,21 @@ class BxAlbumsModule extends BxBaseModTextModule
         $aContentInfo = $this->_oDb->getContentInfoById($aMediaInfo['content_id']);
         $iSender = isLogged() ? bx_get_logged_profile_id() : $aMediaInfo['author'];
         $iAuthor = isset($aContentInfo[$CNF['FIELD_AUTHOR']]) ? $aContentInfo[$CNF['FIELD_AUTHOR']] : $aMediaInfo['author'];
+        
+        /**
+         * @hooks
+         * @hookdef hook-bx_albums-media_deleted 'bx_albums', 'media_deleted' - hook on new media deleted from album
+         * - $unit_name - equals `bx_albums`
+         * - $action - equals `media_deleted` 
+         * - $object_id - album_id
+         * - $sender_id - author's profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] confirmation type can be none/phone/email/email_and_phone/email_or_phone
+         *      - `subobject_id` - [int] id for added media
+         *      - `media_id` - [int] id for added media
+         *      - `media_info` - [array] media info
+         * @hook @ref hook-bx_albums-media_deleted
+         */
         bx_alert($this->getName(), 'media_deleted', $aMediaInfo['content_id'], $iSender, array(
             'object_author_id' => $iAuthor,
 

+ 40 - 1
modules/boonex/analytics/classes/BxAnalyticsModule.php

@@ -113,6 +113,17 @@ class BxAnalyticsModule extends BxDolModule
             }
         }
         
+        /**
+         * @hooks
+         * @hookdef hook-bx_analytics-get_modules 'bx_analytics', 'get_modules' - hook on get modules list with avalaible analytics
+         * - $unit_name - equals `get_modules`
+         * - $action - equals `get_modules` 
+         * - $object_id - not used
+         * - $sender_id -not used
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `list` - [array] by ref, array of modules for analytics as [module_name] = module_title, can be overridden in hook processing
+         * @hook @ref hook-bx_analytics-get_modules
+         */
         bx_alert($this->_aModule['name'], 'get_modules', 0, 0, array(
             'list' => &$aResult,
         ));
@@ -158,7 +169,18 @@ class BxAnalyticsModule extends BxDolModule
             $aRv[BX_ANALYTICS_CONTENT_TOTAL] = _t('_bx_analytics_type_content_growth');
             $aRv[BX_ANALYTICS_CONTENT_SPEED] = _t('_bx_analytics_type_content_speed');
         }
-        
+        /**
+         * @hooks
+         * @hookdef hook-bx_analytics-get_reports 'bx_analytics', 'get_reports' - hook on get avalaible reports for specified module
+         * - $unit_name - equals `bx_analytics`
+         * - $action - equals `get_reports` 
+         * - $object_id - not used
+         * - $sender_id -not used
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `module` - [string] module name
+         *      - `list` - [array] by ref, array of avalaible reports for analytics as [report_name] = report_title, can be overridden in hook processing
+         * @hook @ref hook-bx_analytics-get_reports
+         */
         bx_alert($this->_aModule['name'], 'get_reports', 0, 0, array(
             'module' => $sModuleName,
             'list' => &$aRv,
@@ -316,6 +338,23 @@ class BxAnalyticsModule extends BxDolModule
                 $aData = array();
                 $iValuePrev = 0;
                 
+                /**
+                 * @hooks
+                 * @hookdef hook-bx_analytics-get_chart_data_line 'bx_analytics', 'get_chart_data_line' - hook on get avalaible reports for specified module
+                 * - $unit_name - equals `bx_analytics`
+                 * - $action - equals `get_chart_data_line` 
+                 * - $object_id - not used
+                 * - $sender_id -not used
+                 * - $extra_params - array of additional params with the following array keys:
+                 *      - `module` - [string] module name
+                 *      - `report_name` - [string] report name
+                 *      - `report_type` - [string]  by ref, report name, can be overridden in hook processing
+                 *      - `date_from` - [int] report's start of interval in php time format
+                 *      - `date_to` - [int] report's end of interval in php time format
+                 *      - `data` - [array] by ref, array of data for chart, can be overridden in hook processing
+                 *      - `prev_value` - [int] by ref, previous value for chart (started value), can be overridden in hook processing
+                 * @hook @ref hook-bx_analytics-get_chart_data_line
+                 */
                 bx_alert($this->_aModule['name'], 'get_chart_data_line', 0, 0, array(
                     'module' => $sModuleName,
                     'report_name' => $sReportName,

+ 53 - 0
modules/boonex/channels/classes/BxCnlModule.php

@@ -91,6 +91,23 @@ class BxCnlModule extends BxBaseModGroupsModule
 
         $iCnlProfileId = $oCnlProfile->id();
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_channels-hashtag_added 'bx_channels', 'hashtag_added' - hook on found hashtag in content
+         * - $unit_name - equals `bx_channels`
+         * - $action - equals `hashtag_added` 
+         * - $object_id - content_id in channel
+         * - $sender_id - channel profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] profile_id for content's author
+         *      - `privacy_view` - [string] equal - channel_profile_id
+         *      - `subobject_id` - [int]  content_id in channel
+         *      - `content_module` - [string] module name for content
+         *      - `content_id` - [int] content_id
+         *      - `content_author_id` - [int] equal with object_author_id
+         *      - `timeline_group` - [array] parameters for group event in timeline  ['by' => $sModuleName . '_' . $iAuthorId . '_' . $iContentId, 'field' => 'owner_id']
+         * @hook @ref hook-bx_channels-hashtag_added
+         */
         bx_alert($this->_aModule['name'], 'hashtag_added', $iId, $iCnlProfileId, array(
             'object_author_id' => $iAuthorId, 
             'privacy_view' => -$iCnlProfileId,
@@ -113,6 +130,22 @@ class BxCnlModule extends BxBaseModGroupsModule
             'content_author_id' => $iAuthorId
         );
         bx_alert('system', 'prepare_alert_params', 0, 0, array('unit'=> $this->_aModule['name'], 'action' => 'hashtag_added_notif', 'object_id' => $mixedCnlId, 'sender_id' => $iCnlProfileId, 'extras' => &$aParams));
+        /**
+         * @hooks
+         * @hookdef hook-bx_channels-hashtag_added_notif 'bx_channels', 'hashtag_added_notif' - hook on after found hashtag in content
+         * - $unit_name - equals `bx_channels`
+         * - $action - equals `hashtag_added_notif` 
+         * - $object_id - channel id
+         * - $sender_id - channel profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] profile_id for content's author
+         *      - `privacy_view` - [string] equal - channel_profile_id
+         *      - `subobject_id` - [int]  content_id in channel
+         *      - `content_module` - [string] module name for content
+         *      - `content_id` - [int] content_id
+         *      - `content_author_id` - [int] equal with object_author_id
+         * @hook @ref hook-bx_channels-hashtag_added_notif
+         */
         bx_alert($this->_aModule['name'], 'hashtag_added_notif', $mixedCnlId, $iCnlProfileId, $aParams);
     }
     
@@ -124,7 +157,27 @@ class BxCnlModule extends BxBaseModGroupsModule
         foreach ($aData as $aRow) {
             $iProfileInfo = $oDolProfileQuery->getProfileByContentAndType($aRow['cnl_id'], $this->_aModule['name']);
             if(is_array($iProfileInfo)){
+                /**
+                 * @hooks
+                 * @hookdef hook-bx_channels-hashtag_deleted 'bx_channels', 'hashtag_deleted' - hook on before delete content from channel
+                 * - $unit_name - equals `bx_channels`
+                 * - $action - equals `hashtag_deleted` 
+                 * - $object_id - content id in channel
+                 * - $sender_id - channel profile_id
+                 * @hook @ref hook-bx_channels-hashtag_deleted
+                 */
                 bx_alert($this->_aModule['name'], 'hashtag_deleted', $aRow['id'], $iProfileInfo['id']);
+                 /**
+                 * @hooks
+                 * @hookdef hook-bx_channels-hashtag_deleted_notif 'bx_channels', 'hashtag_deleted_notif' - hook on before delete content from channel
+                 * - $unit_name - equals `bx_channels`
+                 * - $action - equals `hashtag_deleted_notif` 
+                 * - $object_id - channel id
+                 * - $sender_id - channel profile_id
+                 * - $extra_params - array of additional params with the following array keys:
+                 *      - `subobject_id` - [int] content id in channel
+                 * @hook @ref hook-bx_channels-hashtag_deleted_notif
+                 */
                 bx_alert($this->_aModule['name'], 'hashtag_deleted_notif', $aRow['cnl_id'], $iProfileInfo['id'], array('subobject_id' => $aRow['id']));
             }
         }

+ 27 - 0
modules/boonex/convos/classes/BxCnvFormEntry.php

@@ -54,6 +54,19 @@ class BxCnvFormEntry extends BxBaseModTextFormEntry
         // check for spam
         $bSpam = false;
         $sValue = $this->getCleanValue($CNF['FIELD_TEXT']);
+         /**
+         * @hooks
+         * @hookdef hook-system-check_spam 'system', 'check_spam' - hook on check spam in some content
+         * - $unit_name - equals `system`
+         * - $action - equals `check_spam` 
+         * - $object_id - not used  
+         * - $sender_id - account id for current user
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `is_spam` - [bool] by ref, сontain spam content or not, can be overridden in hook processing
+         *      - `content` - [string] by ref, content, can be overridden in hook processing
+         *      - `where` - [string] module name
+         * @hook @ref hook-system-check_spam
+         */
         bx_alert('system', 'check_spam', 0, getLoggedId(), array('is_spam' => &$bSpam, 'content' => &$sValue, 'where' => $this->MODULE));
         self::setSubmittedValue($CNF['FIELD_TEXT'], $sValue, $this->aFormAttrs['method']);
 
@@ -114,6 +127,20 @@ class BxCnvFormEntry extends BxBaseModTextFormEntry
             else {
                 if($iRecipient != $iSender) {
                     $bCanContact = true;
+                    /**
+                     * @hooks
+                     * @hookdef hook-profile-check_contact 'profile', 'check_contact' - hook on check some profile to allow contact him
+                     * - $unit_name - equals `profile`
+                     * - $action - equals `check_contact` 
+                     * - $object_id - not used  
+                     * - $sender_id - not used
+                     * - $extra_params - array of additional params with the following array keys:
+                     *      - `can_contact` - [bool] by ref, can contact or not, can be overridden in hook processing
+                     *      - `sender` - [int] profile_id for sender
+                     *      - `recipient` - [int] profile_id for recipient 
+                     *      - `where` - [string] module name
+                     * @hook @ref hook-profile-check_contact
+                     */
                     bx_alert('profile', 'check_contact', 0, false, array('can_contact' => &$bCanContact, 'sender' => $iSender, 'recipient' => $iRecipient, 'where' => $this->MODULE));
                     if(!$bCanContact)
                         $iFolder = BX_CNV_FOLDER_SPAM;

+ 8 - 1
modules/boonex/convos/classes/BxCnvFormsEntryHelper.php

@@ -29,7 +29,14 @@ class BxCnvFormsEntryHelper extends BxBaseModTextFormsEntryHelper
         if ($sResult = $this->onDataDeleteAfter ($aContentInfo[$CNF['FIELD_ID']], $aContentInfo, $oProfile))
             return $sResult;
 
-        // create an alert
+        /**
+         * @hooks
+         * @hookdef hook-bx_convos-deleted 'bx_convos', 'deleted' - hook on delete conversation
+         * - $unit_name - equals `bx_convos`
+         * - $action - equals `deleted` 
+         * - $object_id - conversation id
+         * @hook @ref hook-bx_convos-deleted
+         */
         bx_alert($this->_oModule->getName(), 'deleted', $aContentInfo[$CNF['FIELD_ID']]);
 
         return '';

+ 40 - 0
modules/boonex/events/classes/BxEventsModule.php

@@ -136,6 +136,17 @@ class BxEventsModule extends BxBaseModGroupsModule implements iBxDolCalendarServ
         if(!$this->_oDb->checkIn($iProfileId, $iId))
             return false;
 
+         /**
+         * @hooks
+         * @hookdef hook-bx_events-check_in 'bx_events', 'check_in' - hook in on somebody check-in some event 
+         * - $unit_name - equals `bx_events`
+         * - $action - equals `check_in` 
+         * - $object_id - event_id
+         * - $sender_id - current user's profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `event_profile_id` - [int] profile_id from checked event
+         * @hook @ref hook-bx_events-check_in
+         */
         bx_alert($this->getName(), 'check_in', $iId, $iProfileId, [
             'event_profile_id' => $aDataEntry['profile_id'],
         ]);
@@ -247,6 +258,23 @@ class BxEventsModule extends BxBaseModGroupsModule implements iBxDolCalendarServ
             $aEntry['cover'] = $this->serviceGetCover($aEntry['id']);
         }
         
+        /**
+         * @hooks
+         * @hookdef hook-bx_events-calendar_data 'bx_events', 'calendar_data' - hook in get data for calendar
+         * - $unit_name - equals `bx_events`
+         * - $action - equals `calendar_data` 
+         * - $object_id - not used 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `params` - [array] array of paramaretes in calendar 
+         *      - `event` - [int] event id
+         *      - `context_id` - [int] profile_id for context of current event
+         *      - `start` - [string] start date in format date('d.m.Y')
+         *      - `end` - [string] end date in format date('d.m.Y')
+         *      - `sql_part` - [array] by ref, sql for data selection, can be overridden in hook processing
+         *      - `data` - [array] by ref, data for calendar, can be overridden in hook processing
+         * @hook @ref hook-bx_events-calendar_data
+         */
         bx_alert($this->getName(), 'calendar_data', 0, false, array(
             'params' => $aParams,
             'event' => $iContentId,
@@ -640,6 +668,18 @@ class BxEventsModule extends BxBaseModGroupsModule implements iBxDolCalendarServ
                 if($bUseIn)
                     $this->sendReminders($aEntry);
 
+                /**
+                 * @hooks
+                 * @hookdef hook-bx_events-reminder 'bx_events', 'reminder' - hook on enent's reminder
+                 * - $unit_name - equals `bx_events`
+                 * - $action - equals `reminder` 
+                 * - $object_id - event_id
+                 * - $sender_id - event profile_id
+                 * - $extra_params - array of additional params with the following array keys:
+                 *      - `object_author_id` - [int] event profile_id 
+                 *      - `reminder` - [int] reminder id
+                 * @hook @ref hook-bx_events-reminder
+                 */
                 bx_alert($sModule, 'reminder', $aEntry[$CNF['FIELD_ID']], $iEventProfileId, array(
                     'object_author_id' => $iEventProfileId,
                     'reminder' => $iReminder

+ 88 - 0
modules/boonex/feedback/classes/BxFdbModule.php

@@ -304,11 +304,29 @@ class BxFdbModule extends BxBaseModGeneralModule
      */
     public function onAddQuestion($iId)
     {
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-added_question 'bx_feedback', 'added_question' - hook on new question added
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `added_question` 
+         * - $object_id - question_id
+         * - $sender_id - not used
+         * @hook @ref hook-bx_feedback-added_question
+         */
         bx_alert($this->getName(), 'added_question', $iId);
     }
 
     public function onEditQuestion($iId)
     {
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-edited_question 'bx_feedback', 'edited_question' - hook on new question edited
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `edited_question` 
+         * - $object_id - question_id
+         * - $sender_id - not used
+         * @hook @ref hook-bx_feedback-edited_question
+         */
         bx_alert($this->getName(), 'edited_question', $iId);
     }
 
@@ -328,6 +346,18 @@ class BxFdbModule extends BxBaseModGeneralModule
                 $this->_oDb->deleteAnswer2User(array('answer_id' => $aAnswer[$CNF['FIELD_ANS_ID']]));
             }
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-deleted_question 'bx_feedback', 'deleted_question' - hook on question deleted
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `deleted_question` 
+         * - $object_id - question_id
+         * - $sender_id - not used
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `question` - [array] all question info
+         *      - `answers` - [array] answers for current question
+         * @hook @ref hook-bx_feedback-deleted_question
+         */
         bx_alert($this->getName(), 'deleted_question', $aQuestion[$CNF['FIELD_ID']], false, array(
             'question' => $aQuestion,
             'answers' => $aAnswers,
@@ -341,6 +371,21 @@ class BxFdbModule extends BxBaseModGeneralModule
         $sModule = $this->getName();
         $aAnswer = $this->_oDb->getAnswers(array('type' => 'id', 'id' => $iAnswerId));
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-added_answer 'bx_feedback', 'added_answer' - hook on new answer added
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `added_answer` 
+         * - $object_id - answer id
+         * - $sender_id - current user profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] current user profile_id
+         *      - `question_id` - [int] question id
+         *      - `important` - [string] answer's important value
+         *      - `data` - [string] answer's content
+         *      - `votes` - [int] count of votes
+         * @hook @ref hook-bx_feedback-added_answer
+         */
         bx_alert($sModule, 'added_answer', $iAnswerId, $iProfileId, array_merge(array(
             'object_author_id' => $iProfileId,
             'question_id' => $iQuestionId, 
@@ -349,6 +394,21 @@ class BxFdbModule extends BxBaseModGeneralModule
             'votes' => $aAnswer['votes']
         ), $aParams));
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-added_answer_notif 'bx_feedback', 'added_answer_notif' - hook on new answer added
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `added_answer_notif` 
+         * - $object_id - question_id
+         * - $sender_id - current user profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] current user profile_id
+         *      - `subobject_id` - [int] answer id
+         *      - `important` - [string] answer's important value
+         *      - `data` - [string] answer's content
+         *      - `votes` - [int] count of votes
+         * @hook @ref hook-bx_feedback-added_answer_notif
+         */
         bx_alert($sModule, 'added_answer_notif', $iQuestionId, $iProfileId, array_merge(array(
             'object_author_id' => $iProfileId,
             'subobject_id' => $iAnswerId, 
@@ -365,6 +425,20 @@ class BxFdbModule extends BxBaseModGeneralModule
         $sModule = $this->getName();
         $aAnswer = $this->_oDb->getAnswers(array('type' => 'id', 'id' => $iAnswerId));
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-deleted_answer 'bx_feedback', 'deleted_answer' - hook on new answer deleted
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `deleted_answer` 
+         * - $object_id - answer id
+         * - $sender_id - current user profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `question_id` - [int] question id
+         *      - `important` - [string] answer's important value
+         *      - `data` - [string] answer's content
+         *      - `votes` - [int] count of votes
+         * @hook @ref hook-bx_feedback-deleted_answer
+         */
         bx_alert($sModule, 'deleted_answer', $iAnswerId, $iProfileId, array_merge(array(
             'question_id' => $iQuestionId,
             'important' => $aAnswer['important'],
@@ -372,6 +446,20 @@ class BxFdbModule extends BxBaseModGeneralModule
             'votes' => $aAnswer['votes']
         ), $aParams));
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_feedback-deleted_answer_notif 'bx_feedback', 'added_answer_notif' - hook on new answer deleted
+         * - $unit_name - equals `bx_feedback`
+         * - $action - equals `added_answer_notif` 
+         * - $object_id - question_id
+         * - $sender_id - current user profile_id
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `subobject_id` - [int] answer id
+         *      - `important` - [string] answer's important value
+         *      - `data` - [string] answer's content
+         *      - `votes` - [int] count of votes
+         * @hook @ref hook-bx_feedback-added_answer_notif
+         */
         bx_alert($sModule, 'deleted_answer_notif', $iQuestionId, $iProfileId, array_merge(array(
             'subobject_id' => $iAnswerId,
             'important' => $aAnswer['important'],

+ 29 - 3
modules/boonex/invites/classes/BxInvModule.php

@@ -550,10 +550,29 @@ class BxInvModule extends BxDolModule
 
     public function onRequest($iRequestId)
     {
-        //--- Event -> Request for Alerts Engine ---//
+        /**
+         * @hooks
+         * @hookdef hook-bx_invites-deleted_answer_notif 'bx_invites', 'request' - hook on create new request on invite
+         * - $unit_name - equals `bx_invites`
+         * - $action - equals `request` 
+         * - $object_id - request id
+         * - $sender_id - not used
+         * @hook @ref hook-bx_invites-request
+         */
         bx_alert($this->_oConfig->getObject('alert'), 'request', $iRequestId);
         $aProfiles = BxDolAclQuery::getInstance()->getProfilesByMembership(array(MEMBERSHIP_ID_MODERATOR, MEMBERSHIP_ID_ADMINISTRATOR));
         foreach($aProfiles as $aProfile) {
+            /**
+             * @hooks
+             * @hookdef hook-bx_invites-request_notify 'bx_invites', 'request_notify' - hook on notify all admins&moderators about new request
+             * - $unit_name - equals `bx_invites`
+             * - $action - equals `request_notify` 
+             * - $object_id - request id
+             * - $sender_id - not used
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `parent_author_id` - [int] profile_id of notified profile
+             * @hook @ref hook-bx_invites-request_notify
+             */
             bx_alert($this->_oConfig->getObject('alert'), 'request_notify', $iRequestId, 0, array('parent_author_id' => $aProfile['id']));
         }
         //--- Event -> Request for Alerts Engine ---//
@@ -594,9 +613,16 @@ class BxInvModule extends BxDolModule
     {
         $this->isAllowedInvite($iProfileId, true);
 
-        //--- Event -> Invite for Alerts Engine ---//
+        /**
+         * @hooks
+         * @hookdef hook-bx_invites-invite 'bx_invites', 'invite' - hook on new invite
+         * - $unit_name - equals `bx_invites`
+         * - $action - equals `invite` 
+         * - $object_id - not used
+         * - $sender_id - invited profile_id
+         * @hook @ref hook-bx_invites-invite
+         */
         bx_alert($this->_oConfig->getObject('alert'), 'invite', 0, $iProfileId);
-        //--- Event -> Invite for Alerts Engine ---//
     }
     
     public function getJoinLink($sKey)

+ 13 - 0
modules/boonex/invites/classes/BxInvResponse.php

@@ -87,6 +87,19 @@ class BxInvResponse extends BxDolAlertsResponse
             return;
         
 		$bNeedToFriend = true;
+        
+        /**
+         * @hooks
+         * @hookdef hook-bx_invites-add_friend 'bx_invites', 'add_friend' - hook on add friend on new user registred by invitaion
+         * - $unit_name - equals `add_friend`
+         * - $action - equals `invite` 
+         * - $object_id - not used
+         * - $sender_id - not used
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `profile_id` - [int] profile_id for user registred by invitaion
+         *      - `override_result` - [bool] by ref, if true friend will be added, can be overridden in hook processing
+         * @hook @ref hook-bx_invites-add_friend
+         */
 		bx_alert($this->_sModule, 'add_friend', 0, 0, [
 			'profile_id' => $oAlert->iObject,
 			'override_result' => &$bNeedToFriend,

+ 10 - 0
modules/boonex/market/classes/BxMarketCronPruning.php

@@ -48,6 +48,16 @@ class BxMarketCronPruning extends BxDolCron
                 }
             }
 
+             /**
+             * @hooks
+             * @hookdef hook-bx_market-license_expire 'bx_market', 'license_expire' - hook on found expired license
+             * - $unit_name - equals `bx_market`
+             * - $action - equals `license_expire` 
+             * - $object_id - not used 
+             * - $sender_id - not used 
+             * - $extra_params - array of expired licenses
+             * @hook @ref hook-bx_market-license_expire
+             */
             bx_alert($this->_oModule->getName(), 'license_expire', 0, false, $aLicense);
             
             $this->_oModule->_oDb->processExpiredLicense($aLicense);

+ 10 - 0
modules/boonex/market/classes/BxMarketGridLicensesAdministration.php

@@ -92,6 +92,16 @@ class BxMarketGridLicensesAdministration extends BxTemplGrid
                 continue;
 
             if((int)$mixedResult > 0)
+                /**
+                 * @hooks
+                 * @hookdef hook-bx_market-license_reset 'bx_market', 'license_reset' - hook on license reset
+                 * - $unit_name - equals `bx_market`
+                 * - $action - equals `license_reset` 
+                 * - $object_id - not used 
+                 * - $sender_id - not used 
+                 * - $extra_params - array of reseted licenses
+                 * @hook @ref hook-bx_market-license_reset
+                 */
                 bx_alert($this->_oModule->getName(), 'license_reset', 0, false, $this->_oModule->_oDb->getLicense([
                     'type' => 'id',
                     'id' => $iId

+ 20 - 0
modules/boonex/smtpmailer/classes/BxSMTPModule.php

@@ -138,6 +138,26 @@ class BxSMTPModule extends BxDolModule
             'ret'       => $iRet,
             'error_message' => $sErrorMessage,            
         );
+        /**
+         * @hooks
+         * @hookdef hook-profile-send_mail 'profile', 'send_mail' - hook in  $oAccount->isConfirmed check
+         * - $unit_name - equals `profile`
+         * - $action - equals `send_mail` 
+         * - $object_id - not used 
+         * - $sender_id - recipient profile_id 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `test_mode` - [bool] test mode or not
+         *      - `email` - [string] email
+         *      - `subject` - [string] letter subject
+         *      - `body` - [string] letter body
+         *      - `header` - [string] letter header
+         *      - `params` - [string] letter params
+         *      - `recipient` - [array] recipient info
+         *      - `html` - [bool] is html letter or not
+         *      - `ret` - [bool] sent successfuly  or not
+         *      - `error_message` - [string] error message
+         * @hook @ref hook-profile-send_mail
+         */
         bx_alert('profile', 'send_mail', $aRecipientInfo && isset($aRecipientInfo['ID']) ? $aRecipientInfo['ID'] : 0, '', $aAlertData);
         //--- create system event [ end ]
 

+ 12 - 0
modules/boonex/stream/classes/BxStrmModule.php

@@ -281,6 +281,18 @@ class BxStrmModule extends BxBaseModTextModule
 
         $this->onPublished($iContentId);
 
+        /**
+         * @hooks
+         * @hookdef hook-bx_stream-publish_succeeded 'bx_stream', 'publish_succeeded' - hook on stream published succeeded
+         * - $unit_name - equals `bx_stream`
+         * - $action - equals `publish_succeeded` 
+         * - $object_id - stream id
+         * - $sender_id - profile_id of stream's author
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] stream's author
+         *      - `privacy_view` - [int] BX_DOL_PG_ALL
+         * @hook @ref hook-bx_stream-publish_succeeded
+         */
         bx_alert($this->getName(), 'publish_succeeded', $aContentInfo[$CNF['FIELD_ID']], $aContentInfo[$CNF['FIELD_AUTHOR']], array(
             'object_author_id' => $aContentInfo[$CNF['FIELD_AUTHOR']],
             'privacy_view' => BX_DOL_PG_ALL,

+ 24 - 0
modules/boonex/tasks/classes/BxTasksFormEntry.php

@@ -226,6 +226,18 @@ class BxTasksFormEntry extends BxBaseModTextFormEntry
         foreach($aMembersToAdd as $iProfileId){
             $oConn->addConnection($iProfileId, $iContentId);
 
+             /**
+             * @hooks
+             * @hookdef hook-bx_tasks-assigned 'bx_tasks', 'assigned' - hook on task assigned to profile
+             * - $unit_name - equals `bx_tasks`
+             * - $action - equals `assigned` 
+             * - $object_id - task id 
+             * - $sender_id - not used 
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `object_author_id` - [int] id for assigned profile
+             *      - `privacy_view` - [string] privacy view value
+             * @hook @ref hook-bx_tasks-assigned
+             */
             bx_alert($this->MODULE, 'assigned', $iContentId, false, array(
                 'object_author_id' => $iProfileId,
                 'privacy_view' => $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]
@@ -235,6 +247,18 @@ class BxTasksFormEntry extends BxBaseModTextFormEntry
         foreach($aMembersToRemove as $iProfileId){
             $oConn->removeConnection($iProfileId, $iContentId);
 
+            /**
+             * @hooks
+             * @hookdef hook-bx_tasks-unassigned 'bx_tasks', 'unassigned' - hook on task unassigned to profile
+             * - $unit_name - equals `bx_tasks`
+             * - $action - equals `unassigned` 
+             * - $object_id - task id 
+             * - $sender_id - not used 
+             * - $extra_params - array of additional params with the following array keys:
+             *      - `object_author_id` - [int] id for unassigned profile
+             *      - `privacy_view` - [string] privacy view value
+             * @hook @ref hook-bx_tasks-unassigned
+             */
             bx_alert($this->MODULE, 'unassigned', $iContentId, false, array(
                 'object_author_id' => $iProfileId,
                 'privacy_view' => $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]

+ 26 - 1
modules/boonex/tasks/classes/BxTasksModule.php

@@ -57,6 +57,18 @@ class BxTasksModule extends BxBaseModTextModule implements iBxDolCalendarService
         $aContentInfo = $this->_oDb->getContentInfoById($iContentId);
 
         $iContentAuthor = (int)$aContentInfo[$CNF['FIELD_AUTHOR']];
+        /**
+         * @hooks
+         * @hookdef hook-bx_tasks-completed 'bx_tasks', 'completed' - hook on task unassigned to profile
+         * - $unit_name - equals `bx_tasks`
+         * - $action - can be `completed` or `reopened`
+         * - $object_id - task id 
+         * - $sender_id - not used 
+         * - $extra_params - array of additional params with the following array keys:
+         *      - `object_author_id` - [int] profile_id for task's author
+         *      - `privacy_view` - [string] privacy view value
+         * @hook @ref hook-bx_tasks-completed
+         */
         bx_alert($this->getName(), $sActionName, $iContentId, false, array(
             'object_author_id' => $iContentAuthor,
             'privacy_view' => $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]
@@ -669,11 +681,24 @@ class BxTasksModule extends BxBaseModTextModule implements iBxDolCalendarService
         if($oConnection) {
             $aProfileIds = $oConnection->getConnectedContent($iContentId);
             if(!empty($aProfileIds) && is_array($aProfileIds))
-                foreach($aProfileIds as $iProfileId)
+                foreach($aProfileIds as $iProfileId){
+                    /**
+                     * @hooks
+                     * @hookdef hook-bx_tasks-expired 'bx_tasks', 'expired' - hook on task unassigned to profile
+                     * - $unit_name - equals `bx_tasks`
+                     * - $action - equals `expired`
+                     * - $object_id - task id 
+                     * - $sender_id - not used 
+                     * - $extra_params - array of additional params with the following array keys:
+                     *      - `object_author_id` - [int] profile_id for task's author
+                     *      - `privacy_view` - [string] privacy view value
+                     * @hook @ref hook-bx_tasks-expired
+                     */
                     bx_alert($this->getName(), 'expired', $iContentId, false, array(
                         'object_author_id' => $iProfileId,
                         'privacy_view' => $aContentInfo[$CNF['FIELD_ALLOW_VIEW_TO']]
                     ));
+                }
         }
     }