AntonLV 9 yıl önce
ebeveyn
işleme
54b0dd66b2

+ 17 - 0
modules/boonex/accounts/classes/BxAccntModule.php

@@ -21,6 +21,23 @@ class BxAccntModule extends BxBaseModGeneralModule
         $this->_oConfig->init($this->_oDb);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_accounts Accounts
+     * @subsection bx_accounts-other Other
+     * @subsubsection bx_accounts-get_menu_addon_manage_tools get_menu_addon_manage_tools
+     * 
+     * @code bx_srv('bx_accounts', 'get_menu_addon_manage_tools', [...]); @endcode
+     * 
+     * Get number of 'unconfirmed' accounts for User End -> Dasboard page -> Manage block.
+     *
+     * @return integer number of 'unconfirmed' accounts
+     * 
+     * @see BxAccntModule::serviceGetMenuAddonManageTools
+     */
+    /** 
+     * @ref bx_accounts-get_menu_addon_manage_tools "get_menu_addon_manage_tools"
+     */
 	public function serviceGetMenuAddonManageTools()
 	{
 		bx_import('SearchResult', $this->_aModule);

+ 200 - 1
modules/boonex/acl/classes/BxAclModule.php

@@ -32,6 +32,24 @@ class BxAclModule extends BxDolModule
 
     /**
      * SERVICE METHODS
+     */
+    
+    /**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-page_blocks Page Blocks
+     * @subsubsection bx_acl-get_block_view get_block_view
+     * 
+     * @code bx_srv('bx_acl', 'get_block_view', [...]); @endcode
+     * 
+     * Get page block with a list of available ACL levels to purchase or get for Free. List is represented as table.
+     *
+     * @return HTML string with a list of ACL levels to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML. On error empty string is returned.
+     * 
+     * @see BxAclModule::serviceGetBlockView
+     */
+    /** 
+     * @ref bx_acl-get_block_view "get_block_view"
      */
 	public function serviceGetBlockView()
 	{
@@ -46,6 +64,23 @@ class BxAclModule extends BxDolModule
         );
 	}
 
+	/**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-page_blocks Page Blocks
+     * @subsubsection bx_acl-get_membership_actions get_membership_actions
+     * 
+     * @code bx_srv('bx_acl', 'get_membership_actions', [...]); @endcode
+     * 
+     * Get page block with a list of current membership level's actions.
+     *
+     * @return HTML string with a list of actions to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML. On error empty string is returned.
+     * 
+     * @see BxAclModule::serviceGetMembershipActions
+     */
+    /** 
+     * @ref bx_acl-get_membership_actions "get_membership_actions"
+     */
 	public function serviceGetMembershipActions($iProfileId)
 	{
 		if($iProfileId != $this->getUserId())
@@ -55,13 +90,45 @@ class BxAclModule extends BxDolModule
 	}
 
 	/**
-     * Integration with Payment based modules.  
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-payments Payments
+     * @subsubsection bx_acl-get_payment_data get_payment_data
+     * 
+     * @code bx_srv('bx_acl', 'get_payment_data', [...]); @endcode
+     * 
+     * Get an array with module's description. Is needed for payments processing module.
+     * 
+     * @return an array with module's description.
+     * 
+     * @see BxAclModule::serviceGetPaymentData
+     */
+    /** 
+     * @ref bx_acl-get_payment_data "get_payment_data"
      */
 	public function serviceGetPaymentData()
     {
         return $this->_aModule;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-payments Payments
+     * @subsubsection bx_acl-get_cart_item get_cart_item
+     * 
+     * @code bx_srv('bx_acl', 'get_cart_item', [...]); @endcode
+     * 
+     * Get an array with level's description. Is used in Shopping Cart in payments processing module.
+     * 
+     * @param $iItemId level's ID.
+     * @return an array with level's description. Empty array is returned if something is wrong.
+     * 
+     * @see BxAclModule::serviceGetCartItem
+     */
+    /** 
+     * @ref bx_acl-get_cart_item "get_cart_item"
+     */
     public function serviceGetCartItem($iItemId)
     {
     	$CNF = &$this->_oConfig->CNF;
@@ -88,6 +155,24 @@ class BxAclModule extends BxDolModule
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-payments Payments
+     * @subsubsection bx_acl-get_cart_items get_cart_items
+     * 
+     * @code bx_srv('bx_acl', 'get_cart_items', [...]); @endcode
+     * 
+     * Get an array with levels' descriptions by seller. Is used in Manual Order Processing in payments processing module.
+     * 
+     * @param $iSellerId seller ID.
+     * @return an array with levels' descriptions. Empty array is returned if something is wrong or seller doesn't have any paid level.
+     * 
+     * @see BxAclModule::serviceGetCartItems
+     */
+    /** 
+     * @ref bx_acl-get_cart_items "get_cart_items"
+     */
     public function serviceGetCartItems($iSellerId)
     {
     	$CNF = &$this->_oConfig->CNF;
@@ -118,26 +203,140 @@ class BxAclModule extends BxDolModule
         return $aResult;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-payments Payments
+     * @subsubsection bx_acl-register_cart_item register_cart_item
+     * 
+     * @code bx_srv('bx_acl', 'register_cart_item', [...]); @endcode
+     * 
+     * Register a processed single time payment inside the Paid Levels module. Is called with payment processing module after the payment was registered there.
+     * 
+     * @param $iClientId client ID.
+     * @param $iSellerId seller ID
+     * @param $iItemId item ID.
+     * @param $iItemCount the number of purchased items.
+     * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
+     * @param $sLicense license number genereted with payment processing module for internal usage
+     * @return an array with purchased prodict's description. Empty array is returned if something is wrong.
+     * 
+     * @see BxAclModule::serviceRegisterCartItem
+     */
+    /** 
+     * @ref bx_acl-register_cart_item "register_cart_item"
+     */
     public function serviceRegisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
     {
         return $this->_serviceRegisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, BX_ACL_LICENSE_TYPE_SINGLE);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-payments Payments
+     * @subsubsection bx_acl-register_subscription_item register_subscription_item
+     * 
+     * @code bx_srv('bx_acl', 'register_subscription_item', [...]); @endcode
+     * 
+     * Register a processed subscription (recurring payment) inside the Paid Levels module. Is called with payment processing module after the subscription was registered there.
+     * 
+     * @param $iClientId client ID.
+     * @param $iSellerId seller ID
+     * @param $iItemId item ID.
+     * @param $iItemCount the number of purchased items.
+     * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
+     * @param $sLicense license number genereted with payment processing module for internal usage
+     * @return an array with subscribed prodict's description. Empty array is returned if something is wrong.
+     * 
+     * @see BxAclModule::serviceRegisterSubscriptionItem
+     */
+    /** 
+     * @ref bx_acl-register_subscription_item "register_subscription_item"
+     */
     public function serviceRegisterSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
     {
 		return $this->_serviceRegisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, BX_ACL_LICENSE_TYPE_RECURRING);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-payments Payments
+     * @subsubsection bx_acl-unregister_cart_item unregister_cart_item
+     * 
+     * @code bx_srv('bx_acl', 'unregister_cart_item', [...]); @endcode
+     * 
+     * Unregister an earlier processed single time payment inside the Paid Levels module. Is called with payment processing module after the payment was unregistered there.
+     * 
+     * @param $iClientId client ID.
+     * @param $iSellerId seller ID
+     * @param $iItemId item ID.
+     * @param $iItemCount the number of purchased items.
+     * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
+     * @param $sLicense license number genereted with payment processing module for internal usage
+     * @return boolean value determining where the payment was unregistered or not.
+     * 
+     * @see BxAclModule::serviceUnregisterCartItem
+     */
+    /** 
+     * @ref bx_acl-unregister_cart_item "unregister_cart_item"
+     */
     public function serviceUnregisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
     {
         return $this->_serviceUnregisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, BX_ACL_LICENSE_TYPE_SINGLE);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-payments Payments
+     * @subsubsection bx_acl-unregister_subscription_item unregister_subscription_item
+     * 
+     * @code bx_srv('bx_acl', 'unregister_subscription_item', [...]); @endcode
+     * 
+     * Unregister an earlier processed subscription (recurring payment) inside the Paid Levels module. Is called with payment processing module after the subscription was unregistered there.
+     * 
+     * @param $iClientId client ID.
+     * @param $iSellerId seller ID
+     * @param $iItemId item ID.
+     * @param $iItemCount the number of purchased items.
+     * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
+     * @param $sLicense license number genereted with payment processing module for internal usage
+     * @return boolean value determining where the subscription was unregistered or not.
+     * 
+     * @see BxAclModule::serviceUnregisterSubscriptionItem
+     */
+    /** 
+     * @ref bx_acl-unregister_subscription_item "unregister_subscription_item"
+     */
     public function serviceUnregisterSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
     {
     	return $this->_serviceUnregisterItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense, BX_ACL_LICENSE_TYPE_RECURRING); 
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_acl Paid Levels
+     * @subsection bx_acl-payments Payments
+     * @subsubsection bx_acl-cancel_subscription_item cancel_subscription_item
+     * 
+     * @code bx_srv('bx_acl', 'cancel_subscription_item', [...]); @endcode
+     * 
+     * Cancel an earlier processed subscription (recurring payment) inside the Paid Levels module. Is called with payment processing module after the subscription was canceled there.
+     * 
+     * @param $iClientId client ID.
+     * @param $iSellerId seller ID
+     * @param $iItemId item ID.
+     * @param $iItemCount the number of purchased items.
+     * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
+     * @return boolean value determining where the subscription was canceled or not.
+     * 
+     * @see BxAclModule::serviceCancelSubscriptionItem
+     */
+    /** 
+     * @ref bx_acl-cancel_subscription_item "cancel_subscription_item"
+     */
     public function serviceCancelSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder)
     {
     	//TODO: Do something if it's necessary.

+ 34 - 0
modules/boonex/contact/classes/BxContactModule.php

@@ -26,6 +26,23 @@ class BxContactModule extends BxDolModule
     /**
      * SERVICE METHODS
      */
+    /**
+     * @page service Service Calls
+     * @section bx_contact Contact
+     * @subsection bx_contact-page_blocks Page Blocks
+     * @subsubsection bx_contact-get_block_form get_block_form
+     * 
+     * @code bx_srv('bx_contact', 'get_block_form', [...]); @endcode
+     * 
+     * Get page block with contact form.
+     *
+     * @return an array describing a block to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxContactModule::serviceGetBlockForm
+     */
+    /** 
+     * @ref bx_contact-get_block_form "get_block_form"
+     */
     public function serviceGetBlockForm()
     {
         $aDefaultFields = array('name', 'email', 'subject', 'body', 'do_submit');
@@ -98,6 +115,23 @@ class BxContactModule extends BxDolModule
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_contact Contact
+     * @subsection bx_contact-other Other
+     * @subsubsection bx_contact-get_contact_page_url get_contact_page_url
+     * 
+     * @code bx_srv('bx_contact', 'get_contact_page_url', [...]); @endcode
+     * 
+     * Get string with contact page URL. Is used in system and inter-modular integration.
+     *
+     * @return string with contact page URL.
+     * 
+     * @see BxContactModule::serviceGetContactPageUrl
+     */
+    /** 
+     * @ref bx_contact-get_block_form "get_block_form"
+     */
     public function serviceGetContactPageUrl()
     {
         //if (true !== $this->isAllowedContact())

+ 158 - 1
modules/boonex/elasticsearch/classes/BxElsModule.php

@@ -113,6 +113,23 @@ class BxElsModule extends BxBaseModGeneralModule
         echo '</pre>';
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_elasticsearch ElasticSearch
+     * @subsection bx_elasticsearch-other Other
+     * @subsubsection bx_elasticsearch-is_configured is_configured
+     * 
+     * @code bx_srv('bx_elasticsearch', 'is_configured', [...]); @endcode
+     * 
+     * Checkes whether the module is correctly configured or not. 
+     *
+     * @return boolean value determining where the module is configured or not.
+     * 
+     * @see BxElsModule::serviceIsConfigured
+     */
+    /** 
+     * @ref bx_elasticsearch-is_configured "is_configured"
+     */
     public function serviceIsConfigured()
     {
         $CNF = &$this->_oConfig->CNF;
@@ -120,6 +137,26 @@ class BxElsModule extends BxBaseModGeneralModule
         return isset($CNF['PARAM_API_URL']) && getParam($CNF['PARAM_API_URL']) != '';
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_elasticsearch ElasticSearch
+     * @subsection bx_elasticsearch-search Search
+     * @subsubsection bx_elasticsearch-search_simple search_simple
+     * 
+     * @code bx_srv('bx_elasticsearch', 'search_simple', [...]); @endcode
+     * 
+     * Perform a simple search by term. Index and Type to search in can be specified.
+     *
+     * @param $sTerm string value with keyword to search for.
+     * @param $sType (optional) if type is specified then the search will be performed in this type only.
+     * @param $sIndex (optional) if index is specified then the search will be performed in this index only.
+     * @return an array with search results.
+     * 
+     * @see BxElsModule::serviceSearchSimple
+     */
+    /** 
+     * @ref bx_elasticsearch-search_simple "search_simple"
+     */
     public function serviceSearchSimple($sTerm, $sType = '', $sIndex = '')
     {
         if(empty($sIndex))
@@ -132,7 +169,22 @@ class BxElsModule extends BxBaseModGeneralModule
         return $mixedResult['hits'];
     }
 
-    /*
+    /**
+     * @page service Service Calls
+     * @section bx_elasticsearch ElasticSearch
+     * @subsection bx_elasticsearch-search Search
+     * @subsubsection bx_elasticsearch-search_extended search_extended
+     * 
+     * @code bx_srv('bx_elasticsearch', 'search_extended', [...]); @endcode
+     * 
+     * Perform an extended search by provided conditions. Index and Type to search in can be specified.
+     *
+     * @param $aCondition an array with conditions to construct search request from.
+     * @param $aSelection (optional) an array with custom condition. 
+     * @param $sType (optional) if type is specified then the search will be performed in this type only.
+     * @param $sIndex (optional) if index is specified then the search will be performed in this index only.
+     * @return an array with search results.
+     * 
      * Condition #1: keyword search
      * $aCondition = array('val' => 'test');
      * 
@@ -160,6 +212,10 @@ class BxElsModule extends BxBaseModGeneralModule
      * 		array('fld' => 'allow_view_to', 'val' => 3)
      * ));
      * 
+     * @see BxElsModule::serviceSearchExtended
+     */
+    /** 
+     * @ref bx_elasticsearch-search_extended "search_extended"
      */
     public function serviceSearchExtended($aCondition, $aSelection = array(), $sType = '', $sIndex = '')
     {
@@ -173,6 +229,26 @@ class BxElsModule extends BxBaseModGeneralModule
         return $mixedResult['hits'];
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_elasticsearch ElasticSearch
+     * @subsection bx_elasticsearch-manage Manage
+     * @subsubsection bx_elasticsearch-get get
+     * 
+     * @code bx_srv('bx_elasticsearch', 'get', [...]); @endcode
+     * 
+     * Get item's data by content ID and type.
+     *
+     * @param $iContentId integer value with content ID.
+     * @param $sType a string with content type.
+     * @param $sIndex (optional) if index is specified then the item will be searched in this index only.
+     * @return an array with item's data.
+     * 
+     * @see BxElsModule::serviceGet
+     */
+    /** 
+     * @ref bx_elasticsearch-get "get"
+     */
     public function serviceGet($iContentId, $sType, $sIndex = '')
     {
         if(empty($sIndex))
@@ -181,6 +257,26 @@ class BxElsModule extends BxBaseModGeneralModule
         return $this->_oApi->getData($sIndex, $sType, $iContentId);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_elasticsearch ElasticSearch
+     * @subsection bx_elasticsearch-manage Manage
+     * @subsubsection bx_elasticsearch-add add
+     * 
+     * @code bx_srv('bx_elasticsearch', 'add', [...]); @endcode
+     * 
+     * Add item to store in Elasticsearch.
+     *
+     * @param $iContentId integer value with content ID.
+     * @param $mixedContentInfo mixed value with content info to store.
+     * @param $sIndex (optional) if index is specified then the item will be stored in this index.
+     * @return boolean value determining where the item was added or not.
+     * 
+     * @see BxElsModule::serviceAdd
+     */
+    /** 
+     * @ref bx_elasticsearch-add "add"
+     */
     public function serviceAdd($iContentId, $mixedContentInfo, $sIndex = '')
     {
         if(is_array($mixedContentInfo)) {
@@ -213,6 +309,26 @@ class BxElsModule extends BxBaseModGeneralModule
         return $mixedResult['result'] == 'created';
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_elasticsearch ElasticSearch
+     * @subsection bx_elasticsearch-manage Manage
+     * @subsubsection bx_elasticsearch-update update
+     * 
+     * @code bx_srv('bx_elasticsearch', 'update', [...]); @endcode
+     * 
+     * Update item in Elasticsearch storage.
+     *
+     * @param $iContentId integer value with content ID.
+     * @param $mixedContentInfo mixed value with new content info.
+     * @param $sIndex (optional) if index is specified then the item will be updated in this index.
+     * @return boolean value determining where the item was updated or not.
+     * 
+     * @see BxElsModule::serviceUpdate
+     */
+    /** 
+     * @ref bx_elasticsearch-update "update"
+     */
     public function serviceUpdate($iContentId, $mixedContentInfo, $sIndex = '')
     {
         if(is_array($mixedContentInfo)) {
@@ -245,6 +361,26 @@ class BxElsModule extends BxBaseModGeneralModule
         return $mixedResult['result'] == 'updated';
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_elasticsearch ElasticSearch
+     * @subsection bx_elasticsearch-manage Manage
+     * @subsubsection bx_elasticsearch-delete delete
+     * 
+     * @code bx_srv('bx_elasticsearch', 'delete', [...]); @endcode
+     * 
+     * Delete item from Elasticsearch storage.
+     *
+     * @param $iContentId integer value with content ID.
+     * @param $mixedContentInfo mixed value with content info which is needed during deletion.
+     * @param $sIndex (optional) if index is specified then the item will be deleted from this index.
+     * @return boolean value determining where the item was deleted or not.
+     * 
+     * @see BxElsModule::serviceDelete
+     */
+    /** 
+     * @ref bx_elasticsearch-delete "delete"
+     */
     public function serviceDelete($iContentId, $mixedContentInfo, $sIndex = '')
     {
         if(is_array($mixedContentInfo)) {
@@ -267,6 +403,25 @@ class BxElsModule extends BxBaseModGeneralModule
         return $mixedResult['result'] == 'deleted';
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_elasticsearch ElasticSearch
+     * @subsection bx_elasticsearch-manage Manage
+     * @subsubsection bx_elasticsearch-index index
+     * 
+     * @code bx_srv('bx_elasticsearch', 'delete', [...]); @endcode
+     * 
+     * Index data in Elasticsearch storage.
+     *
+     * @param $sIndex string value with storage's index name which will be indexed.
+     * @param $sType (optional) if type is specified then data in this type will be indexed only.
+     * @return boolean value determining where the data was indexed or not.
+     * 
+     * @see BxElsModule::serviceIndex
+     */
+    /** 
+     * @ref bx_elasticsearch-index "index"
+     */
     public function serviceIndex($sIndex, $sType = '')
     {
         if(empty($sIndex))
@@ -288,6 +443,8 @@ class BxElsModule extends BxBaseModGeneralModule
             foreach($aIds as $iId)
                 $this->serviceAdd($iId, $oContentInfo);
         }
+
+        return true;
     }
 
     protected function _prepareToIndex($mixed)

+ 352 - 12
modules/boonex/forum/classes/BxForumModule.php

@@ -74,6 +74,25 @@ class BxForumModule extends BxBaseModTextModule
     /**
      * Service methods
      */
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-other Other
+     * @subsubsection bx_forum-get_info get_info
+     * 
+     * @code bx_srv('bx_forum', 'get_info', [...]); @endcode
+     * 
+     * Get content info by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $bSearchableFieldsOnly (optional) boolean value determining all info or "searchable fields" only will be returned.
+     * @return an array with content info. Empty array is returned if something is wrong.
+     * 
+     * @see BxForumModule::serviceGetInfo
+     */
+    /** 
+     * @ref bx_forum-get_info "get_info"
+     */
     public function serviceGetInfo ($iContentId, $bSearchableFieldsOnly = true)
     {
         $aContentInfo = $this->_getFields($iContentId);
@@ -83,6 +102,26 @@ class BxForumModule extends BxBaseModTextModule
         return $aContentInfo;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_new browse_new
+     * 
+     * @code bx_srv('bx_forum', 'browse_new', [...]); @endcode
+     * 
+     * Get page block with a list of items ordered by newness and represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseNew
+     */
+    /** 
+     * @ref bx_forum-browse_new "browse_new"
+     */
 	public function serviceBrowseNew ($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true)
     {
     	$sType = 'new';
@@ -93,6 +132,27 @@ class BxForumModule extends BxBaseModTextModule
         return $this->_serviceBrowseTable(array('type' => $sType));
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_latest browse_latest
+     * 
+     * @code bx_srv('bx_forum', 'browse_latest', [...]); @endcode
+     * 
+     * Get page block with a list of items ordered by Recent Posts in them and represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @param $bShowHeader (optional) boolean value determining whether a resulting table should have Header section or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseNew
+     */
+    /** 
+     * @ref bx_forum-browse_latest "browse_latest"
+     */
 	public function serviceBrowseLatest($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true, $bShowHeader = true)
     {
     	$sType = 'latest';
@@ -103,6 +163,27 @@ class BxForumModule extends BxBaseModTextModule
 		return $this->_serviceBrowseTable(array('type' => $sType), $bShowHeader);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_featured browse_featured
+     * 
+     * @code bx_srv('bx_forum', 'browse_featured', [...]); @endcode
+     * 
+     * Get page block with a list of featured items represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @param $bShowHeader (optional) boolean value determining whether a resulting table should have Header section or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseFeatured
+     */
+    /** 
+     * @ref bx_forum-browse_featured "browse_featured"
+     */
     public function serviceBrowseFeatured($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true, $bShowHeader = true)
     {
         $CNF = &$this->_oConfig->CNF;
@@ -119,6 +200,26 @@ class BxForumModule extends BxBaseModTextModule
 		), $bShowHeader);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_top browse_top
+     * 
+     * @code bx_srv('bx_forum', 'browse_top', [...]); @endcode
+     * 
+     * Get page block with a list of items ordered by a number of comments and represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseTop
+     */
+    /** 
+     * @ref bx_forum-browse_top "browse_top"
+     */
 	public function serviceBrowseTop($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true)
     {
     	$sType = 'top';
@@ -129,6 +230,26 @@ class BxForumModule extends BxBaseModTextModule
 		return $this->_serviceBrowseTable(array('type' => $sType));
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_popular browse_popular
+     * 
+     * @code bx_srv('bx_forum', 'browse_popular', [...]); @endcode
+     * 
+     * Get page block with a list of items ordered by a number of views and represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowsePopular
+     */
+    /** 
+     * @ref bx_forum-browse_popular "browse_popular"
+     */
     public function serviceBrowsePopular ($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true)
     {
         $sType = 'popular';
@@ -139,6 +260,26 @@ class BxForumModule extends BxBaseModTextModule
         return $this->_serviceBrowseTable(array('type' => $sType));
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_updated browse_updated
+     * 
+     * @code bx_srv('bx_forum', 'browse_updated', [...]); @endcode
+     * 
+     * Get page block with a list of updated items represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseUpdated
+     */
+    /** 
+     * @ref bx_forum-browse_updated "browse_updated"
+     */
     public function serviceBrowseUpdated ($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true)
     {
         $sType = 'updated';
@@ -149,6 +290,27 @@ class BxForumModule extends BxBaseModTextModule
         return $this->_serviceBrowseTable(array('type' => $sType));
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_index browse_index
+     * 
+     * @code bx_srv('bx_forum', 'browse_index', [...]); @endcode
+     * 
+     * Get page block for Site's Home page with a list of items ordered by newness and represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @param $bShowHeader (optional) boolean value determining whether a resulting table should have Header section or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseIndex
+     */
+    /** 
+     * @ref bx_forum-browse_index "browse_index"
+     */
 	public function serviceBrowseIndex($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true, $bShowHeader = true)
     {
     	$sType = 'index';
@@ -162,6 +324,25 @@ class BxForumModule extends BxBaseModTextModule
 		), $bShowHeader);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_author browse_author
+     * 
+     * @code bx_srv('bx_forum', 'browse_author', [...]); @endcode
+     * 
+     * Get page block with a list of items filtered by Author and represented as table.
+     * 
+     * @param $iProfileId (optional) integer value with author ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @param $aParams (optional) an array of additional params. It's not used for now.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseAuthor
+     */
+    /** 
+     * @ref bx_forum-browse_author "browse_author"
+     */
 	public function serviceBrowseAuthor ($iProfileId = 0, $aParams = array())
     {
         if(!$iProfileId)
@@ -178,6 +359,25 @@ class BxForumModule extends BxBaseModTextModule
         ), false);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_favorite browse_favorite
+     * 
+     * @code bx_srv('bx_forum', 'browse_favorite', [...]); @endcode
+     * 
+     * Get page block with a list of favorited items by some profile and represented as table.
+     * 
+     * @param $iProfileId (optional) integer value with profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @param $aParams (optional) an array of additional params. It's not used for now.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseFavorite
+     */
+    /** 
+     * @ref bx_forum-browse_favorite "browse_favorite"
+     */
     public function serviceBrowseFavorite ($iProfileId = 0, $aParams = array())
     {
         $CNF = &$this->_oConfig->CNF;
@@ -232,6 +432,26 @@ class BxForumModule extends BxBaseModTextModule
         ), false);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_category browse_category
+     * 
+     * @code bx_srv('bx_forum', 'browse_category', [...]); @endcode
+     * 
+     * Get page block with a list of items filter by some category and represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseCategory
+     */
+    /** 
+     * @ref bx_forum-browse_category "browse_category"
+     */
     public function serviceBrowseCategory($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true)
     {
     	$sType = 'category';
@@ -247,6 +467,26 @@ class BxForumModule extends BxBaseModTextModule
 		return $this->_serviceBrowseTable(array('type' => $sType, 'where' => array('fld' => 'cat', 'val' => $iCategory, 'opr' => '=')));
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_keyword browse_keyword
+     * 
+     * @code bx_srv('bx_forum', 'browse_keyword', [...]); @endcode
+     * 
+     * Get page block with a list of items filter by some keyword and represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseKeyword
+     */
+    /** 
+     * @ref bx_forum-browse_keyword "browse_keyword"
+     */
 	public function serviceBrowseKeyword($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true)
     {
     	$sType = 'keyword';
@@ -258,11 +498,31 @@ class BxForumModule extends BxBaseModTextModule
 		return $this->_serviceBrowseTable(array('type' => $sType, 'where' => $this->_getSearchKeywordDescriptor('#' . $sKeyword)));
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-browse_search_results browse_search_results
+     * 
+     * @code bx_srv('bx_forum', 'browse_search_results', [...]); @endcode
+     * 
+     * Get page block with search results by Author(s), Category, Keyword represented as table.
+     * 
+     * @param $sUnitView (optional) string with unit view type.
+     * @param $bEmptyMessage (optional) boolean value determining whether an "Empty" message should be returned or not.
+     * @param $bAjaxPaginate (optional) boolean value determining whether an Ajax based pagination should be used or not.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceBrowseSearchResults
+     */
+    /** 
+     * @ref bx_forum-browse_search_results "browse_search_results"
+     */
     public function serviceBrowseSearchResults($sUnitView = false, $bEmptyMessage = true, $bAjaxPaginate = true)
     {
     	$sType = 'search';
 
-    	$aAutors = bx_process_input(bx_get('author'));
+    	$aAuthors = bx_process_input(bx_get('author'));
     	$iCategory = bx_process_input(bx_get('category'), BX_DATA_INT);
     	$sKeyword = bx_process_input(bx_get('keyword'));
 
@@ -274,8 +534,8 @@ class BxForumModule extends BxBaseModTextModule
         	return $this->_serviceBrowse('', $sUnitView ? array('unit_view' => $sUnitView) : false, BX_DB_PADDING_DEF, $bEmptyMessage, $bAjaxPaginate);
 
         $aWhereGroupAnd = array('grp' => true, 'opr' => 'AND', 'cnds' => array());
-        if(!empty($aAutors) && is_array($aAutors))
-        	$aWhereGroupAnd['cnds'][] = $this->_getSearchAuthorDescriptor($aAutors);
+        if(!empty($aAuthors) && is_array($aAuthors))
+        	$aWhereGroupAnd['cnds'][] = $this->_getSearchAuthorDescriptor($aAuthors);
 
         if(!empty($iCategory))
         	$aWhereGroupAnd['cnds'][] = array('fld' => 'cat', 'val' => $iCategory, 'opr' => '=');
@@ -286,10 +546,23 @@ class BxForumModule extends BxBaseModTextModule
 		return $this->_serviceBrowseTable(array('type' => $sType, 'where' => $aWhereGroupAnd), false);
     }
 
-	/**
-     * Get number of discussions for some profile
-     * @param $iProfileId - profile to get discussions for, if omitted then currently logged in profile is used
-     * @return integer
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-other Other
+     * @subsubsection bx_forum-get_discussions_num get_discussions_num
+     * 
+     * @code bx_srv('bx_forum', 'get_discussions_num', [...]); @endcode
+     * 
+     * Get number of discussions for some profile.
+     * 
+     * @param $iProfileId (optional) profile to get discussions for, if omitted then currently logged in profile is used.
+     * @return integer value with a number of discussions.
+     * 
+     * @see BxForumModule::serviceGetDiscussionsNum
+     */
+    /** 
+     * @ref bx_forum-get_discussions_num "get_discussions_num"
      */
     public function serviceGetDiscussionsNum ($iProfileId = 0)
     {
@@ -300,9 +573,22 @@ class BxForumModule extends BxBaseModTextModule
     }
 
     /**
-     * Get number of unreplied discussions for some profile
-     * @param $iProfileId - profile to get unreplied discussions for, if omitted then currently logged is profile is used
-     * @return integer
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-other Other
+     * @subsubsection bx_forum-get_unreplied_discussions_num get_unreplied_discussions_num
+     * 
+     * @code bx_srv('bx_forum', 'get_unreplied_discussions_num', [...]); @endcode
+     * 
+     * Get number of unreplied discussions for some profile.
+     * 
+     * @param $iProfileId (optional) profile to get unreplied discussions for, if omitted then currently logged is profile is used.
+     * @return integer value with a number of discussions.
+     * 
+     * @see BxForumModule::serviceGetUnrepliedDiscussionsNum
+     */
+    /** 
+     * @ref bx_forum-get_unreplied_discussions_num "get_unreplied_discussions_num"
      */
     public function serviceGetUnrepliedDiscussionsNum ($iProfileId = 0)
     {
@@ -313,7 +599,29 @@ class BxForumModule extends BxBaseModTextModule
     }
 
     /**
-     * Update last comment time and author
+     * 
+     */
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-other Other
+     * @subsubsection bx_forum-trigger_comment_post trigger_comment_post
+     * 
+     * @code bx_srv('bx_forum', 'trigger_comment_post', [...]); @endcode
+     * 
+     * Update last comment time and author when new comment was added in the discussion.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $iProfileId integer value with profile ID.
+     * @param $iCommentId integer value with comment ID.
+     * @param $iTimestamp (optional) date in UNIX Timestamp format, if omitted then current date is used.
+     * @param $sCommentText (optional) string value with text of comment.
+     * @return boolean value determining where the operation is successful or not.
+     * 
+     * @see BxForumModule::serviceTriggerCommentPost
+     */
+    /** 
+     * @ref bx_forum-trigger_comment_post "trigger_comment_post"
      */
     public function serviceTriggerCommentPost ($iContentId, $iProfileId, $iCommentId, $iTimestamp = 0, $sCommentText = '')
     {
@@ -354,7 +662,22 @@ class BxForumModule extends BxBaseModTextModule
     }
 
     /**
-     * Entry collaborators block
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-entity_participants entity_participants
+     * 
+     * @code bx_srv('bx_forum', 'entity_participants', [...]); @endcode
+     * 
+     * Get page block with discussion's collaborators.
+     * 
+     * @param $iContentId (optional) content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceEntityParticipants
+     */
+    /** 
+     * @ref bx_forum-entity_participants "entity_participants"
      */
     public function serviceEntityParticipants ($iContentId = 0)
     {
@@ -369,6 +692,23 @@ class BxForumModule extends BxBaseModTextModule
         return $this->_oTemplate->entryParticipants ($aContentInfo, 5, 'right');
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_forum Discussions
+     * @subsection bx_forum-page_blocks Page Blocks
+     * @subsubsection bx_forum-search search
+     * 
+     * @code bx_srv('bx_forum', 'search', [...]); @endcode
+     * 
+     * Get page block with search form.
+     * 
+     * @return HTML string with block content to display on the site or false if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxForumModule::serviceSearch
+     */
+    /** 
+     * @ref bx_forum-search "search"
+     */
 	public function serviceSearch()
     {
     	$CNF = $this->_oConfig->CNF;

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

@@ -67,6 +67,23 @@ class BxInvModule extends BxDolModule
     /**
      * SERVICE METHODS
      */
+    /**
+     * @page service Service Calls
+     * @section bx_invites Invitations
+     * @subsection bx_invites-page_blocks Page Blocks
+     * @subsubsection bx_invites-get_block_invite get_block_invite
+     * 
+     * @code bx_srv('bx_invites', 'get_block_invite', [...]); @endcode
+     * 
+     * Get page block for member's Dashboard which displays invitations related info and action(s).
+     *
+     * @return an array describing a block to display on the site or empty string if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxInvModule::serviceGetBlockInvite
+     */
+    /** 
+     * @ref bx_invites-get_block_invite "get_block_invite"
+     */
     public function serviceGetBlockInvite()
     {
 		$iProfileId = $this->getProfileId();
@@ -85,6 +102,23 @@ class BxInvModule extends BxDolModule
     	);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_invites Invitations
+     * @subsection bx_invites-page_blocks Page Blocks
+     * @subsubsection bx_invites-get_block_form_invite get_block_form_invite
+     * 
+     * @code bx_srv('bx_invites', 'get_block_form_invite', [...]); @endcode
+     * 
+     * Get page block with invite form.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxInvModule::serviceGetBlockFormInvite
+     */
+    /** 
+     * @ref bx_invites-get_block_form_invite "get_block_form_invite"
+     */
     public function serviceGetBlockFormInvite()
     {
     	$iProfileId = $this->getProfileId();
@@ -129,6 +163,23 @@ class BxInvModule extends BxDolModule
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_invites Invitations
+     * @subsection bx_invites-page_blocks Page Blocks
+     * @subsubsection bx_invites-get_block_form_request get_block_form_request
+     * 
+     * @code bx_srv('bx_invites', 'get_block_form_request', [...]); @endcode
+     * 
+     * Get page block with request invitation form.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxInvModule::serviceGetBlockFormRequest
+     */
+    /** 
+     * @ref bx_invites-get_block_form_request "get_block_form_request"
+     */
     public function serviceGetBlockFormRequest()
     {
     	if(!$this->_oConfig->isRequestInvite())
@@ -179,6 +230,23 @@ class BxInvModule extends BxDolModule
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_invites Invitations
+     * @subsection bx_invites-page_blocks Page Blocks
+     * @subsubsection bx_invites-get_block_manage_requests get_block_manage_requests
+     * 
+     * @code bx_srv('bx_invites', 'get_block_manage_requests', [...]); @endcode
+     * 
+     * Get page block with manage invitation requests table.
+     *
+     * @return HTML string with block content to display on the site or empty string if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxInvModule::serviceGetBlockManageRequests
+     */
+    /** 
+     * @ref bx_invites-get_block_manage_requests "get_block_manage_requests"
+     */
     public function serviceGetBlockManageRequests()
     {
         $oGrid = BxDolGrid::getObjectInstance($this->_oConfig->getObject('grid_requests'));
@@ -189,14 +257,44 @@ class BxInvModule extends BxDolModule
 		return $oGrid->getCode();
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_invites Invitations
+     * @subsection bx_invites-other Other
+     * @subsubsection bx_invites-get_menu_addon_requests get_menu_addon_requests
+     * 
+     * @code bx_srv('bx_invites', 'get_menu_addon_requests', [...]); @endcode
+     * 
+     * Get number or invitation requests.
+     *
+     * @return integer value with number of invitation requests.
+     * 
+     * @see BxInvModule::serviceGetMenuAddonRequests
+     */
+    /** 
+     * @ref bx_invites-get_menu_addon_requests "get_menu_addon_requests"
+     */
 	public function serviceGetMenuAddonRequests()
 	{
         return $this->_oDb->getRequests(array('type' => 'count_all'));
 	}
 
-    /**
-     * Perform neccessary checking on join form
-     * @return empty string - if join is allowed and should be processed as usual, non-empty string - if join form need to be replaced with this code
+	/**
+     * @page service Service Calls
+     * @section bx_invites Invitations
+     * @subsection bx_invites-other Other
+     * @subsubsection bx_invites-account_add_form_check account_add_form_check
+     * 
+     * @code bx_srv('bx_invites', 'account_add_form_check', [...]); @endcode
+     * 
+     * Perform neccessary checking on join form.
+     *
+     * @return empty string - if join is allowed and should be processed as usual, non-empty string - if join form need to be replaced with this code.
+     * 
+     * @see BxInvModule::serviceAccountAddFormCheck
+     */
+    /** 
+     * @ref bx_invites-account_add_form_check "account_add_form_check"
      */
 	public function serviceAccountAddFormCheck()
 	{

+ 216 - 99
modules/boonex/market/classes/BxMarketModule.php

@@ -73,6 +73,23 @@ class BxMarketModule extends BxBaseModTextModule
         echoJson(array_slice($aResult, 0, $iLimit));
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_market Market
+     * @subsection bx_market-other Other
+     * @subsubsection bx_market-get_searchable_fields get_searchable_fields
+     * 
+     * @code bx_srv('bx_market', 'get_searchable_fields', [...]); @endcode
+     * 
+     * Get a list of searchable fields. Is used in common search engine. 
+     *
+     * @return an array with a list of searchable fields.
+     * 
+     * @see BxMarketModule::serviceGetSearchableFields
+     */
+    /** 
+     * @ref bx_market-get_searchable_fields "get_searchable_fields"
+     */
     public function serviceGetSearchableFields ()
     {
         $CNF = &$this->_oConfig->CNF;
@@ -85,16 +102,20 @@ class BxMarketModule extends BxBaseModTextModule
     
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-page-blocks Page Blocks
-     * @see BxMarketModule::serviceEntityCreate
+     * @section bx_market Market
+     * @subsection bx_market-page_blocks Page Blocks
+     * @subsubsection bx_market-entity_create entity_create
+     * 
+     * @code bx_srv('bx_market', 'entity_create', [...]); @endcode
      * 
      * Get page block with product creation form or an error message if something wasn't configured correctly.
      *
      * @return HTML string with block content to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxMarketModule::serviceEntityCreate
      */
     /** 
-     * @ref bx-market-page-blocks "Page Blocks"
+     * @ref bx_market-entity_create "entity_create"
      */
     public function serviceEntityCreate ()
     {
@@ -111,17 +132,21 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-page-blocks Page Blocks
-     * @see BxMarketModule::serviceEntityDownload
+     * @section bx_market Market
+     * @subsection bx_market-page_blocks Page Blocks
+     * @subsubsection bx_market-entity_download entity_download
+     * 
+     * @code bx_srv('bx_market', 'entity_download', [...]); @endcode
      * 
      * Get page block with a list of downloadable packages attached to the product. If something is wrong an error message is returned.
      *
      * @param $iContentId (optional) product's ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
      * @return an array describing a block to display on the site or false if there is no enough input data. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxMarketModule::serviceEntityDownload
      */
     /** 
-     * @ref bx-market-page-blocks "Page Blocks"
+     * @ref bx_market-entity_download "entity_download"
      */
     public function serviceEntityDownload ($iContentId = 0)
     {
@@ -155,17 +180,21 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-page-blocks Page Blocks
-     * @see BxMarketModule::serviceEntityRating
+     * @section bx_market Market
+     * @subsection bx_market-page_blocks Page Blocks
+     * @subsubsection bx_market-entity_rating entity_rating
+     * 
+     * @code bx_srv('bx_market', 'entity_rating', [...]); @endcode
      * 
      * Get page block with Stars based product's rating.
      *
      * @param $iContentId (optional) product's ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
      * @return HTML string with block content to display on the site or false if there is no enough input data. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxMarketModule::serviceEntityRating
      */
     /** 
-     * @ref bx-market-page-blocks "Page Blocks"
+     * @ref bx_market-entity_rating "entity_rating"
      */
     public function serviceEntityRating($iContentId = 0)
     {
@@ -174,17 +203,21 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-page-blocks Page Blocks
-     * @see BxMarketModule::serviceEntityAuthorEntities
+     * @section bx_market Market
+     * @subsection bx_market-page_blocks Page Blocks
+     * @subsubsection bx_market-entity_author_entities entity_author_entities
+     * 
+     * @code bx_srv('bx_market', 'entity_author_entities', [...]); @endcode
      * 
      * Get page block with a list of other products of the same author.
      *
      * @param $iContentId (optional) product's ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
      * @return an array describing a block to display on the site or false if there is no enough input data. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxMarketModule::serviceEntityAuthorEntities
      */
     /** 
-     * @ref bx-market-page-blocks "Page Blocks"
+     * @ref bx_market-entity_author_entities "entity_author_entities"
      */
 	public function serviceEntityAuthorEntities($iContentId = 0)
     {
@@ -206,16 +239,20 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-page-blocks Page Blocks
-     * @see BxMarketModule::serviceBlockLicenses
+     * @section bx_market Market
+     * @subsection bx_market-page_blocks Page Blocks
+     * @subsubsection bx_market-block_licenses block_licenses
+     * 
+     * @code bx_srv('bx_market', 'block_licenses', [...]); @endcode
      * 
      * Get page block with a list of licenses purchased by currently logged member.
      *
      * @return an array describing a block to display on the site or false if there is no enough input data. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxMarketModule::serviceBlockLicenses
      */
     /** 
-     * @ref bx-market-page-blocks "Page Blocks"
+     * @ref bx_market-block_licenses "block_licenses"
      */
 	public function serviceBlockLicenses() 
 	{
@@ -234,16 +271,20 @@ class BxMarketModule extends BxBaseModTextModule
 
 	/**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-page-blocks Page Blocks
-     * @see BxMarketModule::serviceBlockLicensesNote
+     * @section bx_market Market
+     * @subsection bx_market-page_blocks Page Blocks
+     * @subsubsection bx_market-block_licenses_note block_licenses_note
+     * 
+     * @code bx_srv('bx_market', 'block_licenses_note', [...]); @endcode
      * 
      * Get page block with a notice for licenses usage.
      *
      * @return HTML string with block content to display on the site.
+     * 
+     * @see BxMarketModule::serviceBlockLicensesNote
      */
     /** 
-     * @ref bx-market-page-blocks "Page Blocks"
+     * @ref bx_market-block_licenses_note "block_licenses_note"
      */
 	public function serviceBlockLicensesNote()
 	{
@@ -252,17 +293,21 @@ class BxMarketModule extends BxBaseModTextModule
 
 	/**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-licenses Licenses
-     * @see BxMarketModule::serviceGetUnusedLicensesNum
+     * @section bx_market Market
+     * @subsection bx_market-licenses Licenses
+     * @subsubsection bx_market-get_unused_licenses_num get_unused_licenses_num
+     * 
+     * @code bx_srv('bx_market', 'get_unused_licenses_num', [...]); @endcode
      * 
      * Get number of unused licenses for some profile. It can be used in menus with "alert" counters.
      *
      * @param $iProfileId profile to get unused licenses for, if omitted then currently logged in profile is used
      * @return an integer value with a number of unused licenses.
+     * 
+     * @see BxMarketModule::serviceGetUnusedLicensesNum
      */
     /** 
-     * @ref bx-market-licenses "Licenses"
+     * @ref bx_market-get_unused_licenses_num "get_unused_licenses_num"
      */
     public function serviceGetUnusedLicensesNum ($iProfileId = 0)
     {
@@ -275,9 +320,11 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-licenses Licenses
-     * @see BxMarketModule::serviceHasLicense
+     * @section bx_market Market
+     * @subsection bx_market-licenses Licenses
+     * @subsubsection bx_market-has_license has_license
+     * 
+     * @code bx_srv('bx_market', 'has_license', [...]); @endcode
      * 
      * Check whether a profile has a license for specified product. Domain on which the license is used can be attached to checking.
      *
@@ -285,9 +332,11 @@ class BxMarketModule extends BxBaseModTextModule
      * @param $iProductId product which the license(s) will be searched for.  
      * @param $sDomain (optional) domain name on which the license is used.
      * @return boolean value determining where the license is available or not.
+     * 
+     * @see BxMarketModule::serviceHasLicense
      */
     /** 
-     * @ref bx-market-licenses "Licenses"
+     * @ref bx_market-has_license "has_license"
      */
 	public function serviceHasLicense ($iProfileId, $iProductId, $sDomain = '')
     {
@@ -296,17 +345,21 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-licenses Licenses
-     * @see BxMarketModule::serviceGetLicense
+     * @section bx_market Market
+     * @subsection bx_market-licenses Licenses
+     * @subsubsection bx_market-get_license get_license
+     * 
+     * @code bx_srv('bx_market', 'has_license', [...]); @endcode
      * 
      * Get a list of licenses which meet requirements provided in the input array.
      *
      * @param $aParams array of requirements which will be used for searching.
      * @return an array of licenses which meet requirements.
+     * 
+     * @see BxMarketModule::serviceGetLicense
      */
     /** 
-     * @ref bx-market-licenses "Licenses"
+     * @ref bx_market-get_license "get_license"
      */
     public function serviceGetLicense ($aParams)
     {
@@ -315,18 +368,22 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-licenses Licenses
-     * @see BxMarketModule::serviceUpdateLicense
+     * @section bx_market Market
+     * @subsection bx_market-licenses Licenses
+     * @subsubsection bx_market-update_license update_license
+     * 
+     * @code bx_srv('bx_market', 'update_license', [...]); @endcode
      * 
      * Update license(s) changing necessary fields. Updatable license(s) should meet requirements provided in the input array.
      *
      * @param $aSet an array of data to be saved  
      * @param $aWhere an array of requirements which will be used for searching.
      * @return an array of licenses which meet requirements.
+     * 
+     * @see BxMarketModule::serviceUpdateLicense
      */
     /** 
-     * @ref bx-market-licenses "Licenses"
+     * @ref bx_market-update_license "update_license"
      */
     public function serviceUpdateLicense ($aSet, $aWhere)
     {
@@ -335,18 +392,22 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-browsing Browsing
-     * @see BxMarketModule::serviceGetEntryBy
+     * @section bx_market Market
+     * @subsection bx_market-browsing Browsing
+     * @subsubsection bx_market-get_entry_by get_entry_by
+     * 
+     * @code bx_srv('bx_market', 'get_entry_by', [...]); @endcode
      * 
      * Get entry (product) which meets requirements.
      *
      * @param $sType string with search type.  
      * @param $mixedValue mixed value to be used for searching.
      * @return an array describing a product which meets requirements.
+     * 
+     * @see BxMarketModule::serviceGetEntryBy
      */
     /** 
-     * @ref bx-market-browsing "Browsing"
+     * @ref bx_market-get_entry_by "get_entry_by"
      */
     public function serviceGetEntryBy($sType, $mixedValue)
     {
@@ -355,17 +416,21 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-browsing Browsing
-     * @see BxMarketModule::serviceGetEntriesBy
+     * @section bx_market Market
+     * @subsection bx_market-browsing Browsing
+     * @subsubsection bx_market-get_entries_by get_entries_by
+     * 
+     * @code bx_srv('bx_market', 'get_entries_by', [...]); @endcode
      * 
      * Get an array of entries (products) which meet requirements.
      * 
      * @param $aParams an array of requirements which will be used for searching.
      * @return an array of products which meets requirements.
+     * 
+     * @see BxMarketModule::serviceGetEntriesBy
      */
     /** 
-     * @ref bx-market-browsing "Browsing"
+     * @ref bx_market-get_entries_by "get_entries_by"
      */
     public function serviceGetEntriesBy($aParams)
     {
@@ -375,16 +440,20 @@ class BxMarketModule extends BxBaseModTextModule
     /**
      * @page service Service Calls
      * @section Market Market
-     * @subsection bx-market-entry Entry
-     * @see BxMarketModule::serviceGetThumbnail
+     * @subsection bx_market-entry Entry
+     * @subsubsection bx_market-get_thumbnail get_thumbnail
+     * 
+     * @code bx_srv('bx_market', 'get_thumbnail', [...]); @endcode
      * 
      * Get an array of image URLs for the product's thumbnail. Returned images have different dimensions ('small' and 'big').
      * 
      * @param $iPhotoId photo ID which is attached to a product as thumbnail.
      * @return an array of image URLs.
+     * 
+     * @see BxMarketModule::serviceGetThumbnail
      */
     /** 
-     * @ref bx-market-entry "Entry"
+     * @ref bx_market-get_thumbnail "get_thumbnail"
      */
     public function serviceGetThumbnail($iPhotoId)
     {
@@ -401,17 +470,21 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-entry Entry
-     * @see BxMarketModule::serviceGetCover
+     * @section bx_market Market
+     * @subsection bx_market-entry Entry
+     * @subsubsection bx_market-get_cover get_cover
+     * 
+     * @code bx_srv('bx_market', 'get_cover', [...]); @endcode
      * 
      * Get an array of image URLs for the product's cover. Returned images have different dimensions ('small', 'large' and 'big').
      * 
      * @param $iPhotoId photo ID which is attached to a product as cover.
      * @return an array of image URLs.
+     * 
+     * @see BxMarketModule::serviceGetCover
      */
     /** 
-     * @ref bx-market-entry "Entry"
+     * @ref bx_market-get_cover "get_cover"
      */
     public function serviceGetCover($iPhotoId)
     {
@@ -430,17 +503,21 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-entry Entry
-     * @see BxMarketModule::serviceGetFile
+     * @section bx_market Market
+     * @subsection bx_market-entry Entry
+     * @subsubsection bx_market-get_file get_file
+     * 
+     * @code bx_srv('bx_market', 'get_file', [...]); @endcode
      * 
      * Get an array with file's description.
      * 
      * @param $iFileId file ID which is attached to a product as package (version, update, etc).
      * @return an array with file's description.
+     * 
+     * @see BxMarketModule::serviceGetFile
      */
     /** 
-     * @ref bx-market-entry "Entry"
+     * @ref bx_market-get_file "get_file"
      */
     public function serviceGetFile($iFileId)
     {
@@ -461,18 +538,22 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-entry Entry
-     * @see BxMarketModule::serviceGetUpdates
+     * @section bx_market Market
+     * @subsection bx_market-entry Entry
+     * @subsubsection bx_market-get_updates get_updates
+     * 
+     * @code bx_srv('bx_market', 'get_updates', [...]); @endcode
      * 
      * Get an array with update(s)' description(s).
      * 
      * @param $iContentId product's ID.
      * @param $sVersion (optional) if version is specified then it will be used for searching as 'Version From'.
      * @return an array with update(s)' description(s).
+     * 
+     * @see BxMarketModule::serviceGetUpdates
      */
     /** 
-     * @ref bx-market-entry "Entry"
+     * @ref bx_market-get_updates "get_updates"
      */
 	public function serviceGetUpdates($iContentId, $sVersion = '')
     {
@@ -495,17 +576,21 @@ class BxMarketModule extends BxBaseModTextModule
 
 	/**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-entry Entry
-     * @see BxMarketModule::serviceGetScreenshots
+     * @section bx_market Market
+     * @subsection bx_market-entry Entry
+     * @subsubsection bx_market-get_screenshots get_screenshots
+     * 
+     * @code bx_srv('bx_market', 'get_screenshots', [...]); @endcode
      * 
      * Get an array with screenshots' descriptions.
      * 
      * @param $iItemId product's ID.
      * @return an array with screenshots' descriptions.
+     * 
+     * @see BxMarketModule::serviceGetScreenshots
      */
     /** 
-     * @ref bx-market-entry "Entry"
+     * @ref bx_market-get_screenshots "get_screenshots"
      */
     public function serviceGetScreenshots($iItemId)
     {
@@ -536,16 +621,20 @@ class BxMarketModule extends BxBaseModTextModule
 
 	/**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-payments Payments
-     * @see BxMarketModule::serviceGetPaymentData
+     * @section bx_market Market
+     * @subsection bx_market-payments Payments
+     * @subsubsection bx_market-get_payment_data get_payment_data
+     * 
+     * @code bx_srv('bx_market', 'get_payment_data', [...]); @endcode
      * 
      * Get an array with module's description. Is needed for payments processing module.
      * 
      * @return an array with module's description.
+     * 
+     * @see BxMarketModule::serviceGetPaymentData
      */
     /** 
-     * @ref bx-market-payments "Payments"
+     * @ref bx_market-get_payment_data "get_payment_data"
      */
 	public function serviceGetPaymentData()
     {
@@ -554,17 +643,21 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-payments Payments
-     * @see BxMarketModule::serviceGetCartItem
+     * @section bx_market Market
+     * @subsection bx_market-payments Payments
+     * @subsubsection bx_market-get_cart_item get_cart_item
+     * 
+     * @code bx_srv('bx_market', 'get_cart_item', [...]); @endcode
      * 
      * Get an array with prodict's description. Is used in Shopping Cart in payments processing module.
      * 
      * @param $iItemId product's ID.
      * @return an array with prodict's description. Empty array is returned if something is wrong.
+     * 
+     * @see BxMarketModule::serviceGetCartItem
      */
     /** 
-     * @ref bx-market-payments "Payments"
+     * @ref bx_market-get_cart_item "get_cart_item"
      */
     public function serviceGetCartItem($iItemId)
     {
@@ -594,17 +687,21 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-payments Payments
-     * @see BxMarketModule::serviceGetCartItems
+     * @section bx_market Market
+     * @subsection bx_market-payments Payments
+     * @subsubsection bx_market-get_cart_items get_cart_items
+     * 
+     * @code bx_srv('bx_market', 'get_cart_items', [...]); @endcode
      * 
      * Get an array with prodicts' descriptions by seller. Is used in Manual Order Processing in payments processing module.
      * 
      * @param $iSellerId seller ID.
      * @return an array with prodicts' descriptions. Empty array is returned if something is wrong or seller doesn't have any products.
+     * 
+     * @see BxMarketModule::serviceGetCartItems
      */
     /** 
-     * @ref bx-market-payments "Payments"
+     * @ref bx_market-get_cart_items "get_cart_items"
      */
     public function serviceGetCartItems($iSellerId)
     {
@@ -637,9 +734,11 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-payments Payments
-     * @see BxMarketModule::serviceRegisterCartItem
+     * @section bx_market Market
+     * @subsection bx_market-payments Payments
+     * @subsubsection bx_market-register_cart_item register_cart_item
+     * 
+     * @code bx_srv('bx_market', 'register_cart_item', [...]); @endcode
      * 
      * Register a processed single time payment inside the Market module. Is called with payment processing module after the payment was registered there.
      * 
@@ -650,9 +749,11 @@ class BxMarketModule extends BxBaseModTextModule
      * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
      * @param $sLicense license number genereted with payment processing module for internal usage
      * @return an array with purchased prodict's description. Empty array is returned if something is wrong.
+     * 
+     * @see BxMarketModule::serviceRegisterCartItem
      */
     /** 
-     * @ref bx-market-payments "Payments"
+     * @ref bx_market-register_cart_item "register_cart_item"
      */
     public function serviceRegisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
     {
@@ -661,9 +762,11 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-payments Payments
-     * @see BxMarketModule::serviceRegisterSubscriptionItem
+     * @section bx_market Market
+     * @subsection bx_market-payments Payments
+     * @subsubsection bx_market-register_subscription_item register_subscription_item
+     * 
+     * @code bx_srv('bx_market', 'register_subscription_item', [...]); @endcode
      * 
      * Register a processed subscription (recurring payment) inside the Market module. Is called with payment processing module after the subscription was registered there.
      * 
@@ -674,9 +777,11 @@ class BxMarketModule extends BxBaseModTextModule
      * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
      * @param $sLicense license number genereted with payment processing module for internal usage
      * @return an array with subscribed prodict's description. Empty array is returned if something is wrong.
+     * 
+     * @see BxMarketModule::serviceRegisterSubscriptionItem
      */
     /** 
-     * @ref bx-market-payments "Payments"
+     * @ref bx_market-register_subscription_item "register_subscription_item"
      */
     public function serviceRegisterSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
     {
@@ -685,9 +790,11 @@ class BxMarketModule extends BxBaseModTextModule
 
 	/**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-payments Payments
-     * @see BxMarketModule::serviceUnregisterCartItem
+     * @section bx_market Market
+     * @subsection bx_market-payments Payments
+     * @subsubsection bx_market-unregister_cart_item unregister_cart_item
+     * 
+     * @code bx_srv('bx_market', 'unregister_cart_item', [...]); @endcode
      * 
      * Unregister an earlier processed single time payment inside the Market module. Is called with payment processing module after the payment was unregistered there.
      * 
@@ -698,9 +805,11 @@ class BxMarketModule extends BxBaseModTextModule
      * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
      * @param $sLicense license number genereted with payment processing module for internal usage
      * @return boolean value determining where the payment was unregistered or not.
+     * 
+     * @see BxMarketModule::serviceUnregisterCartItem
      */
     /** 
-     * @ref bx-market-payments "Payments"
+     * @ref bx_market-unregister_cart_item "unregister_cart_item"
      */
     public function serviceUnregisterCartItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
     {
@@ -709,9 +818,11 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-payments Payments
-     * @see BxMarketModule::serviceUnregisterSubscriptionItem
+     * @section bx_market Market
+     * @subsection bx_market-payments Payments
+     * @subsubsection bx_market-unregister_subscription_item unregister_subscription_item
+     * 
+     * @code bx_srv('bx_market', 'unregister_subscription_item', [...]); @endcode
      * 
      * Unregister an earlier processed subscription (recurring payment) inside the Market module. Is called with payment processing module after the subscription was unregistered there.
      * 
@@ -722,9 +833,11 @@ class BxMarketModule extends BxBaseModTextModule
      * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
      * @param $sLicense license number genereted with payment processing module for internal usage
      * @return boolean value determining where the subscription was unregistered or not.
+     * 
+     * @see BxMarketModule::serviceUnregisterSubscriptionItem
      */
     /** 
-     * @ref bx-market-payments "Payments"
+     * @ref bx_market-unregister_subscription_item "unregister_subscription_item"
      */
     public function serviceUnregisterSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder, $sLicense)
     {
@@ -733,9 +846,11 @@ class BxMarketModule extends BxBaseModTextModule
 
     /**
      * @page service Service Calls
-     * @section Market Market
-     * @subsection bx-market-payments Payments
-     * @see BxMarketModule::serviceCancelSubscriptionItem
+     * @section bx_market Market
+     * @subsection bx_market-payments Payments
+     * @subsubsection bx_market-cancel_subscription_item cancel_subscription_item
+     * 
+     * @code bx_srv('bx_market', 'cancel_subscription_item', [...]); @endcode
      * 
      * Cancel an earlier processed subscription (recurring payment) inside the Market module. Is called with payment processing module after the subscription was canceled there.
      * 
@@ -745,9 +860,11 @@ class BxMarketModule extends BxBaseModTextModule
      * @param $iItemCount the number of purchased items.
      * @param $sOrder order number received from payment provider (PayPal, Stripe, etc)
      * @return boolean value determining where the subscription was canceled or not.
+     * 
+     * @see BxMarketModule::serviceCancelSubscriptionItem
      */
     /** 
-     * @ref bx-market-payments "Payments"
+     * @ref bx_market-cancel_subscription_item "cancel_subscription_item"
      */
 	public function serviceCancelSubscriptionItem($iClientId, $iSellerId, $iItemId, $iItemCount, $sOrder)
     {

+ 66 - 0
modules/boonex/notifications/classes/BxNtfsModule.php

@@ -40,8 +40,23 @@ class BxNtfsModule extends BxBaseModNotificationsModule
 
     /**
      * SERVICE METHODS
+     */
+    /**
+     * @page service Service Calls
+     * @section bx_notifications Notifications
+     * @subsection bx_notifications-page_blocks Page Blocks
+     * @subsubsection bx_notifications-get_block_view get_block_view
+     * 
+     * @code bx_srv('bx_notifications', 'get_block_view', [...]); @endcode
      * 
      * Get View block for a separate page. Will return a block with "Empty" message if nothing found.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxNtfsModule::serviceGetBlockView
+     */
+    /** 
+     * @ref bx_notifications-get_block_view "get_block_view"
      */
     public function serviceGetBlockView($sType = '', $iStart = -1, $iPerPage = -1, $aModules = array())
     {
@@ -74,6 +89,23 @@ class BxNtfsModule extends BxBaseModNotificationsModule
         return array('content' => $sContent); 
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_notifications Notifications
+     * @subsection bx_notifications-browsing Browsing
+     * @subsubsection bx_notifications-get_event_by_id get_event_by_id
+     * 
+     * @code bx_srv('bx_notifications', 'get_event_by_id', [...]); @endcode
+     * 
+     * Get event's data by event ID.
+     *
+     * @return an array with event's data.
+     * 
+     * @see BxNtfsModule::serviceGetEventById
+     */
+    /** 
+     * @ref bx_notifications-get_event_by_id "get_event_by_id"
+     */
     public function serviceGetEventById($iId)
     {
         $aParams = array(
@@ -83,6 +115,23 @@ class BxNtfsModule extends BxBaseModNotificationsModule
     	return $this->_oDb->getEvents($aParams);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_notifications Notifications
+     * @subsection bx_notifications-other Other
+     * @subsubsection bx_notifications-get_unread_notifications_num get_unread_notifications_num
+     * 
+     * @code bx_srv('bx_notifications', 'get_unread_notifications_num', [...]); @endcode
+     * 
+     * Get number of unread notifications.
+     *
+     * @return integer value with number of unread notifications.
+     * 
+     * @see BxNtfsModule::serviceGetUnreadNotificationsNum
+     */
+    /** 
+     * @ref bx_notifications-get_unread_notifications_num "get_unread_notifications_num"
+     */
     public function serviceGetUnreadNotificationsNum($iOwnerId = 0)
     {
     	if(!$iOwnerId)
@@ -98,6 +147,23 @@ class BxNtfsModule extends BxBaseModNotificationsModule
 		return $iCount;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_notifications Notifications
+     * @subsection bx_notifications-other Other
+     * @subsubsection bx_notifications-get_live_updates get_live_updates
+     * 
+     * @code bx_srv('bx_notifications', 'get_live_updates', [...]); @endcode
+     * 
+     * Get data for Live Updates system.
+     *
+     * @return an array with special format.
+     * 
+     * @see BxNtfsModule::serviceGetLiveUpdates
+     */
+    /** 
+     * @ref bx_notifications-get_live_updates "get_live_updates"
+     */
     public function serviceGetLiveUpdates($aMenuItemParent, $aMenuItemChild, $iCount = 0)
     {
         $iOwnerId = $this->getUserId();

+ 103 - 69
modules/boonex/payment/classes/BxPaymentCart.php

@@ -20,6 +20,24 @@ class BxPaymentCart extends BxBaseModPaymentCart
 
     /*
      * Service methods
+     */
+    
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-page_blocks Page Blocks
+     * @subsubsection bx_payment-get_block_carts get_block_carts
+     * 
+     * @code bx_srv('bx_payment', 'get_block_carts', [...], 'Cart'); @endcode
+     * 
+     * Get page block with shopping carts by vendors.
+     *
+     * @return an array describing a block to display on the site or an empty string if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPaymentCart::serviceGetBlockCarts
+     */
+    /** 
+     * @ref bx_payment-get_block_carts "get_block_carts"
      */
 	public function serviceGetBlockCarts()
     {
@@ -37,6 +55,23 @@ class BxPaymentCart extends BxBaseModPaymentCart
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-page_blocks Page Blocks
+     * @subsubsection bx_payment-get_block_cart get_block_cart
+     * 
+     * @code bx_srv('bx_payment', 'get_block_cart', [...], 'Cart'); @endcode
+     * 
+     * Get page block with content of selected shopping cart.
+     *
+     * @return an array describing a block to display on the site or an empty string if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPaymentCart::serviceGetBlockCart
+     */
+    /** 
+     * @ref bx_payment-get_block_cart "get_block_cart"
+     */
 	public function serviceGetBlockCart()
     {
     	// Don't show the block at all if 'seller_id' not exists.
@@ -47,11 +82,15 @@ class BxPaymentCart extends BxBaseModPaymentCart
 
     	$iUserId = $this->_oModule->getProfileId();
         if(empty($iUserId))
-            return MsgBox(_t($CNF['T']['ERR_REQUIRED_LOGIN']));
+            return array(
+            	'content' => MsgBox(_t($CNF['T']['ERR_REQUIRED_LOGIN']))
+            );
 
     	$iSellerId = bx_process_input(bx_get('seller_id'), BX_DATA_INT);
     	if(empty($iSellerId))
-    		return MsgBox(_t($CNF['T']['ERR_UNKNOWN_VENDOR']));
+    		return array(
+            	'content' => MsgBox(_t($CNF['T']['ERR_UNKNOWN_VENDOR']))
+    		);
 
 		$aSeller = $this->_oModule->getProfileInfo($iSellerId);
         return array(
@@ -60,6 +99,23 @@ class BxPaymentCart extends BxBaseModPaymentCart
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-page_blocks Page Blocks
+     * @subsubsection bx_payment-get_block_cart_history get_block_cart_history
+     * 
+     * @code bx_srv('bx_payment', 'get_block_cart_history', [...], 'Cart'); @endcode
+     * 
+     * Get page block with shopping cart history.
+     *
+     * @return an array describing a block to display on the site or an empty string if something is wrong. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPaymentCart::serviceGetBlockCartHistory
+     */
+    /** 
+     * @ref bx_payment-get_block_cart_history "get_block_cart_history"
+     */
     public function serviceGetBlockCartHistory()
     {
     	$CNF = &$this->_oModule->_oConfig->CNF;
@@ -68,13 +124,36 @@ class BxPaymentCart extends BxBaseModPaymentCart
 
     	$iUserId = $this->_oModule->getProfileId();
         if(empty($iUserId))
-            return MsgBox(_t($CNF['T']['ERR_REQUIRED_LOGIN']));
+            return array(
+            	'content' => MsgBox(_t($CNF['T']['ERR_REQUIRED_LOGIN']))
+            );
 
         return array(
         	'content' => $this->_oModule->_oTemplate->displayBlockHistory($iUserId, $iSellerId),
 		);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-purchase_processing Purchase Processing
+     * @subsubsection bx_payment-add_to_cart add_to_cart
+     * 
+     * @code bx_srv('bx_payment', 'add_to_cart', [...], 'Cart'); @endcode
+     * 
+     * Add an item described with method's params to shopping cart.
+     *
+     * @param $iSellerId integer value with seller ID.
+     * @param $mixedModuleId mixed value (ID, Name or URI) determining a module from which the action was initiated.
+     * @param $iItemId integer value with item ID.
+     * @param $iItemCount integer value with a number of items for purchasing.
+     * @return an array with special format which describes the result of operation.
+     * 
+     * @see BxPaymentCart::serviceAddToCart
+     */
+    /** 
+     * @ref bx_payment-add_to_cart "add_to_cart"
+     */
     public function serviceAddToCart($iSellerId, $mixedModuleId, $iItemId, $iItemCount)
     {
     	$CNF = &$this->_oModule->_oConfig->CNF;
@@ -82,7 +161,7 @@ class BxPaymentCart extends BxBaseModPaymentCart
     	$iModuleId = $this->_oModule->_oConfig->getModuleId($mixedModuleId);
     	$iClientId = $this->_oModule->getProfileId();
 
-    	$mixedResult = $this->_checkData($iClientId, $iSellerId, $iModuleId, $iItemId, $iItemCount);
+    	$mixedResult = $this->_oModule->checkData($iClientId, $iSellerId, $iModuleId, $iItemId, $iItemCount);
     	if($mixedResult !== true)
     		return $mixedResult;
 
@@ -118,6 +197,26 @@ class BxPaymentCart extends BxBaseModPaymentCart
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-purchase_processing Purchase Processing
+     * @subsubsection bx_payment-delete_from_cart delete_from_cart
+     * 
+     * @code bx_srv('bx_payment', 'delete_from_cart', [...], 'Cart'); @endcode
+     * 
+     * Delete an item(s) from shopping cart.
+     *
+     * @param $iSellerId integer value with seller ID. The items owned by this seller will be removed only.
+     * @param $iModuleId (optional) integer value with module ID. If specified, the items related to this module will be removed only.
+     * @param $iItemId (optional) integer value with item ID. If specified, the item with this ID will be removed only.
+     * @return an array with special format which describes the result of operation.
+     * 
+     * @see BxPaymentCart::serviceDeleteFromCart
+     */
+    /** 
+     * @ref bx_payment-delete_from_cart "delete_from_cart"
+     */
     public function serviceDeleteFromCart($iSellerId, $iModuleId = 0, $iItemId = 0)
     {
     	$CNF = &$this->_oModule->_oConfig->CNF;
@@ -141,40 +240,6 @@ class BxPaymentCart extends BxBaseModPaymentCart
         return array('code' => 0, 'message' => _t($CNF['T']['MSG_ITEM_DELETED']));
     }
 
-	public function serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount, $sRedirect = '')
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$iClientId = $this->_oModule->getProfileId();
-
-    	$mixedResult = $this->_checkData($iClientId, $iSellerId, $iModuleId, $iItemId, $iItemCount);
-    	if($mixedResult !== true)
-    		return $mixedResult;
-
-        $aSellerProviders = $this->_oModule->_oDb->getVendorInfoProvidersRecurring($iSellerId);
-        if(empty($aSellerProviders))
-            return array('code' => 5, 'message' => _t($CNF['T']['ERR_NOT_ACCEPT_PAYMENTS']));
-
-        $aCartItem = array($iSellerId, $iModuleId, $iItemId, $iItemCount);
-        $sCartItem = $this->_oModule->_oConfig->descriptorA2S($aCartItem);
-
-		if(empty($sSellerProvider)) {
-			$sId = $this->_oModule->_oConfig->getHtmlIds('cart', 'providers_select') . BX_PAYMENT_TYPE_RECURRING;
-			$sTitle = _t($CNF['T']['POPUP_PROVIDERS_SELECT']);
-			return array('popup' => array(
-				'html' => BxTemplStudioFunctions::getInstance()->popupBox($sId, $sTitle, $this->_oModule->_oTemplate->displayProvidersSelector($aCartItem, $aSellerProviders, $sRedirect)), 
-				'options' => array('closeOnOuterClick' => true)
-			));
-		}
-
-		$aProvider = $aSellerProviders[$sSellerProvider];
-        $mixedResult = $this->_oModule->serviceInitializeCheckout(BX_PAYMENT_TYPE_RECURRING, $iSellerId, $aProvider['name'], array($sCartItem), $sRedirect);
-        if(is_string($mixedResult))
-        	return array('code' => 6, 'message' => _t($mixedResult));
-
-		return $mixedResult;
-    }
-
     public function getInfo($sType, $iUserId, $iSellerId = BX_PAYMENT_EMPTY_ID, $aItems = array())
     {
         if($iSellerId != BX_PAYMENT_EMPTY_ID && !empty($aItems))
@@ -244,37 +309,6 @@ class BxPaymentCart extends BxBaseModPaymentCart
             'items' => $aItemsInfo
         );
     }
-
-	protected function _checkData($iClientId, $iSellerId, $iModuleId, $iItemId, $iItemCount)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-		if($iSellerId == BX_PAYMENT_EMPTY_ID || empty($iModuleId) || empty($iItemId) || empty($iItemCount))
-            return array('code' => 1, 'message' => _t($CNF['T']['ERR_WRONG_DATA']));
-
-		$iClientId = $this->_oModule->getProfileId();
-        if(empty($iClientId)) {
-        	$sLoginUrl = BxDolPermalinks::getInstance()->permalink('page.php?i=login');
-            return array('code' => 2, 'eval' => 'window.open("' . $sLoginUrl . '", "_self");');
-        }
-
-        $mixedResult = $this->_oModule->isAllowedPurchase(array('module_id' => $iModuleId, 'item_id' => $iItemId));
-        if($mixedResult !== true) {
-            if(is_string($mixedResult) && !empty($mixedResult))
-                return array('code' => 2, 'message' => $mixedResult);
-            else 
-                return array('code' => 1, 'message' => _t($CNF['T']['ERR_WRONG_DATA']));
-        }
-
-        if($iClientId == $iSellerId)
-            return array('code' => 3, 'message' => _t($CNF['T']['ERR_SELF_PURCHASE']));
-
-        $aSeller = $this->_oModule->getVendorInfo($iSellerId);
-        if(!$aSeller['active'])
-            return array('code' => 4, 'message' => _t($CNF['T']['ERR_INACTIVE_VENDOR']));
-
-		return true;
-    }
 }
 
 /** @} */

+ 20 - 1
modules/boonex/payment/classes/BxPaymentDetails.php

@@ -34,10 +34,29 @@ class BxPaymentDetails extends BxBaseModPaymentDetails
         $this->_bCollapseFirst = true;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-page_blocks Page Blocks
+     * @subsubsection bx_payment-get_block_details get_block_details
+     * 
+     * @code bx_srv('bx_payment', 'get_block_details', [...], 'Details'); @endcode
+     * 
+     * Get page block with payment providers' configuration settings represented as subforms.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPaymentDetails::serviceGetBlockDetails
+     */
+    /** 
+     * @ref bx_payment-get_block_details "get_block_details"
+     */
     public function serviceGetBlockDetails($iUserId = BX_PAYMENT_EMPTY_ID)
     {
         if(!$this->_oModule->isLogged())
-			return MsgBox(_t($this->_sLangsPrefix . 'err_required_login'));
+			return array(
+        		'content' => MsgBox(_t($this->_sLangsPrefix . 'err_required_login'))
+			);
 
         $iUserId = $iUserId != BX_PAYMENT_EMPTY_ID ? $iUserId : $this->_oModule->getProfileId();
 

+ 26 - 3
modules/boonex/payment/classes/BxPaymentJoin.php

@@ -24,8 +24,25 @@ class BxPaymentJoin extends BxBaseModPaymentJoin
 
     /*
      * Service methods
+     */
+
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-page_blocks Page Blocks
+     * @subsubsection bx_payment-get_block_join get_block_join
+     * 
+     * @code bx_srv('bx_payment', 'get_block_join', [...], 'Join'); @endcode
      * 
+     * Get page block with join form to complete the payment.
      * TODO: Should be tested when paid memberships with "Paid Before Join" or some similar feature will appear.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPaymentJoin::serviceGetBlockJoin
+     */
+    /** 
+     * @ref bx_payment-get_block_join "get_block_join"
      */
 	public function serviceGetBlockJoin()
     {
@@ -42,14 +59,20 @@ class BxPaymentJoin extends BxBaseModPaymentJoin
     	}
 
 		if(empty($iPendingId))
-			return MsgBox(_t($this->_sLangsPrefix . 'err_not_allowed'));
+			return array(
+        		'content' => MsgBox(_t($this->_sLangsPrefix . 'err_not_allowed'))
+			);
 
 		$aPending = $this->_oModule->_oDb->getOrderPending(array('type' => 'id', 'id' => $iPendingId));
 	    if(empty($aPending['order']) || (int)$aPending['error_code'] != 1)
-			return MsgBox(_t($this->_sLangsPrefix . 'err_not_processed'));
+			return array(
+        		'content' => MsgBox(_t($this->_sLangsPrefix . 'err_not_processed'))
+			);
 
 		if((int)$aPending['processed'] == 1)
-			return MsgBox(_t($this->_sLangsPrefix . 'err_already_processed'));
+			return array(
+        		'content' => MsgBox(_t($this->_sLangsPrefix . 'err_already_processed'))
+			);
 
 		//--- 'System' -> 'Join after Payment' for Alerts Engine ---//
 		$bOverride = false;

+ 146 - 4
modules/boonex/payment/classes/BxPaymentModule.php

@@ -119,9 +119,24 @@ class BxPaymentModule extends BxBaseModPaymentModule
 		));
     }
 
-
     /**
-     * Payment Details Methods
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-purchase_processing Purchase Processing
+     * @subsubsection bx_payment-is_accepting_payments is_accepting_payments
+     * 
+     * @code bx_srv('bx_payment', 'is_accepting_payments', [...]); @endcode
+     * 
+     * Check whether the specified vendor has a configured payment provider or not.
+     *
+     * @param $iVendorId integer value with vendor ID.
+     * @param $sPaymentType (optional) string value with payment type. If specified then the vendor will be checked for having the payment provider of the requested type.
+     * @return boolean value determining the result of checking.
+     * 
+     * @see BxPaymentModule::serviceIsAcceptingPayments
+     */
+    /** 
+     * @ref bx_payment-is_accepting_payments "is_accepting_payments"
      */
     public function serviceIsAcceptingPayments($iVendorId, $sPaymentType = '')
     {
@@ -146,12 +161,52 @@ class BxPaymentModule extends BxBaseModPaymentModule
 		return $bResult;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-purchase_processing Purchase Processing
+     * @subsubsection bx_payment-is_payment_provider is_payment_provider
+     * 
+     * @code bx_srv('bx_payment', 'is_payment_provider', [...]); @endcode
+     * 
+     * Check whether the specified vendor has configured the specified payment provider or not.
+     *
+     * @param $iVendorId integer value with vendor ID.
+     * @param $sVendorProvider string value with payment provider name.
+     * @param $sPaymentType (optional) string value with payment type. If specified then the vendor will be checked for having the payment provider of the requested type.
+     * @return boolean value determining the result of checking.
+     * 
+     * @see BxPaymentModule::serviceIsPaymentProvider
+     */
+    /** 
+     * @ref bx_payment-is_payment_provider "is_payment_provider"
+     */
     public function serviceIsPaymentProvider($iVendorId, $sVendorProvider, $sPaymentType = '')
     {
     	$aProvider = $this->serviceGetPaymentProvider($iVendorId, $sVendorProvider, $sPaymentType);
     	return $aProvider !== false;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-purchase_processing Purchase Processing
+     * @subsubsection bx_payment-get_payment_provider get_payment_provider
+     * 
+     * @code bx_srv('bx_payment', 'is_payment_provider', [...]); @endcode
+     * 
+     * Get configuration settings for the payment provider entered by the specified vendor.
+     *
+     * @param $iVendorId integer value with vendor ID.
+     * @param $sVendorProvider string value with payment provider name.
+     * @param $sPaymentType (optional) string value with payment type. If specified then the vendor will be checked for having the payment provider of the requested type.
+     * @return an array with special format describing the payment provider or false value if something is wrong.
+     * 
+     * @see BxPaymentModule::serviceGetPaymentProvider
+     */
+    /** 
+     * @ref bx_payment-get_payment_provider "get_payment_provider"
+     */
     public function serviceGetPaymentProvider($iVendorId, $sVendorProvider, $sPaymentType = '')
     {
     	$aProviders = array();
@@ -171,6 +226,23 @@ class BxPaymentModule extends BxBaseModPaymentModule
     	return !empty($aProviders) && !empty($aProviders[$sVendorProvider]) && is_array(($aProviders[$sVendorProvider])) ? $aProviders[$sVendorProvider] : false;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-other Other
+     * @subsubsection bx_payment-get_options_default_currency_code get_options_default_currency_code
+     * 
+     * @code bx_srv('bx_payment', 'get_options_default_currency_code', [...]); @endcode
+     * 
+     * Get an array with available currencies. Is used in forms.
+     *
+     * @return an array with available currencies represented as key => value pairs.
+     * 
+     * @see BxPaymentModule::serviceGetOptionsDefaultCurrencyCode
+     */
+    /** 
+     * @ref bx_payment-get_options_default_currency_code "get_options_default_currency_code"
+     */
     public function serviceGetOptionsDefaultCurrencyCode()
     {
         $CNF = &$this->_oConfig->CNF;
@@ -187,6 +259,23 @@ class BxPaymentModule extends BxBaseModPaymentModule
         return $aResult;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-other Other
+     * @subsubsection bx_payment-get_options_site_admin get_options_site_admin
+     * 
+     * @code bx_srv('bx_payment', 'get_options_site_admin', [...]); @endcode
+     * 
+     * Get an array with profiles which can be used as 'Site Admin (Owner)'. 'Site Admin' is a person who will be displayed to buyers when something is selling on behalf of the site.
+     *
+     * @return an array with profiles represented as key => value pairs.
+     * 
+     * @see BxPaymentModule::serviceGetOptionsSiteAdmin
+     */
+    /** 
+     * @ref bx_payment-get_options_site_admin "get_options_site_admin"
+     */
     public function serviceGetOptionsSiteAdmin()
     {
         $aResult = array(
@@ -243,7 +332,7 @@ class BxPaymentModule extends BxBaseModPaymentModule
     	if(empty($iItemCount))
     		$iItemCount = 1;
 
-        $aResult = $this->getObjectCart()->serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount);
+        $aResult = $this->getObjectSubscriptions()->serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount);
         $bRedirect = !empty($aResult['redirect']);
 
         if(!empty($aResult['popup'])) {
@@ -277,7 +366,7 @@ class BxPaymentModule extends BxBaseModPaymentModule
     		$iItemCount = 1;
         $sRedirect = bx_process_input(bx_get('redirect'));
 
-        $aResult = $this->getObjectCart()->serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount, $sRedirect);
+        $aResult = $this->getObjectSubscriptions()->serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount, $sRedirect);
 		echoJson($aResult);
     }
 
@@ -364,6 +453,28 @@ class BxPaymentModule extends BxBaseModPaymentModule
         exit;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-purchase_processing Purchase Processing
+     * @subsubsection bx_payment-initialize_checkout initialize_checkout
+     * 
+     * @code bx_srv('bx_payment', 'initialize_checkout', [...]); @endcode
+     * 
+     * Initialize the checkout process.
+     * 
+     * @param $sType string value with payment type (single or recurring). 
+     * @param $iSellerId integer value with seller ID. 
+     * @param $sProvider string value with payment provider name. 
+     * @param $aItems (optional) an array with items to be purchased. 
+     * @param $sRedirect (optional) string value with redirect URL if it's needed.
+     * @return the result depends on the payment provider which is used for processing or represented as string value with error message if something is wrong.
+     * 
+     * @see BxPaymentModule::serviceInitializeCheckout
+     */
+    /** 
+     * @ref bx_payment-initialize_checkout "initialize_checkout"
+     */
 	public function serviceInitializeCheckout($sType, $iSellerId, $sProvider, $aItems = array(), $sRedirect = '')
 	{
 		if(!is_array($aItems))
@@ -548,6 +659,37 @@ class BxPaymentModule extends BxBaseModPaymentModule
         return $aCheckResult[CHECK_ACTION_MESSAGE];
     }
 
+    public function checkData($iClientId, $iSellerId, $iModuleId, $iItemId, $iItemCount)
+    {
+    	$CNF = &$this->_oConfig->CNF;
+
+		if($iSellerId == BX_PAYMENT_EMPTY_ID || empty($iModuleId) || empty($iItemId) || empty($iItemCount))
+            return array('code' => 1, 'message' => _t($CNF['T']['ERR_WRONG_DATA']));
+
+		$iClientId = $this->getProfileId();
+        if(empty($iClientId)) {
+        	$sLoginUrl = BxDolPermalinks::getInstance()->permalink('page.php?i=login');
+            return array('code' => 2, 'eval' => 'window.open("' . $sLoginUrl . '", "_self");');
+        }
+
+        $mixedResult = $this->isAllowedPurchase(array('module_id' => $iModuleId, 'item_id' => $iItemId));
+        if($mixedResult !== true) {
+            if(is_string($mixedResult) && !empty($mixedResult))
+                return array('code' => 2, 'message' => $mixedResult);
+            else 
+                return array('code' => 1, 'message' => _t($CNF['T']['ERR_WRONG_DATA']));
+        }
+
+        if($iClientId == $iSellerId)
+            return array('code' => 3, 'message' => _t($CNF['T']['ERR_SELF_PURCHASE']));
+
+        $aSeller = $this->getVendorInfo($iSellerId);
+        if(!$aSeller['active'])
+            return array('code' => 4, 'message' => _t($CNF['T']['ERR_INACTIVE_VENDOR']));
+
+		return true;
+    }
+
 	public function registerPayment($mixedPending)
     {
     	$aPending = is_array($mixedPending) ? $mixedPending : $this->_oDb->getOrderPending(array('type' => 'id', 'id' => (int)$mixedPending));

+ 52 - 9
modules/boonex/payment/classes/BxPaymentOrders.php

@@ -24,6 +24,25 @@ class BxPaymentOrders extends BxBaseModPaymentOrders
 
 	/*
      * Service methods
+     */
+    
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-page_blocks Page Blocks
+     * @subsubsection bx_payment-get_block_orders get_block_orders
+     * 
+     * @code bx_srv('bx_payment', 'get_block_orders', [...], 'Orders'); @endcode
+     * 
+     * Get page block with a list of orders represented as table.
+     *
+     * @param $sType string value with order type (processed or pending).
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPaymentOrders::serviceGetBlockOrders
+     */
+    /** 
+     * @ref bx_payment-get_block_orders "get_block_orders"
      */
 	public function serviceGetBlockOrders($sType = '', $iUserId = BX_PAYMENT_EMPTY_ID)
     {
@@ -33,7 +52,9 @@ class BxPaymentOrders extends BxBaseModPaymentOrders
     		$sType = bx_get('type') !== false ? bx_process_input(bx_get('type')) : BX_PAYMENT_ORDERS_TYPE_PROCESSED;
 
     	if(!$this->_oModule->isLogged())
-            return MsgBox(_t($this->_sLangsPrefix . 'err_required_login'));
+            return array(
+            	'content' => MsgBox(_t($this->_sLangsPrefix . 'err_required_login'))
+            );
 
         $iUserId = $iUserId != BX_PAYMENT_EMPTY_ID ? $iUserId : $this->_oModule->getProfileId();
         if($sType == BX_PAYMENT_ORDERS_TYPE_PROCESSED)
@@ -54,17 +75,28 @@ class BxPaymentOrders extends BxBaseModPaymentOrders
     }
 
     /**
-     * Check transaction(s) in database which satisty all conditions.
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-other Other
+     * @subsubsection bx_payment-get_orders_info get_orders_info
+     * 
+     * @code bx_srv('bx_payment', 'get_orders_info', [...], 'Orders'); @endcode
+     * 
+     * Get transaction(s) which meets all requirements.
      *
-     * @param array $aConditions an array of pears('key' => 'value'). Available keys are the following:
+     * @param $aConditions an array of pears('key' => 'value'). Available keys are the following:
      * a. license - internal license (string)
      * b. client_id - client's ID (integer)
      * c. seller_id - seller's ID (integer)
      * d. module_id - modules's where the purchased product is located. (integer)
      * e. item_id - item id in the database. (integer)
      * f. date - the date when the payment was processed(UNIXTIME STAMP)
-     *
-     * @return array of transactions. Each transaction has full info(client ID, seller ID, external transaction ID, date and so on)
+     * @return an array of transactions. Each transaction has full info(client ID, seller ID, external transaction ID, date and so on)
+     * 
+     * @see BxPaymentOrders::serviceGetOrdersInfo
+     */
+    /** 
+     * @ref bx_payment-get_orders_info "get_orders_info"
      */
     public function serviceGetOrdersInfo($aConditions)
     {
@@ -75,9 +107,16 @@ class BxPaymentOrders extends BxBaseModPaymentOrders
     }
 
     /**
-     * Check pending transaction(s) in database which satisty all conditions.
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-other Other
+     * @subsubsection bx_payment-get_pending_orders_info get_pending_orders_info
+     * 
+     * @code bx_srv('bx_payment', 'get_pending_orders_info', [...], 'Orders'); @endcode
+     * 
+     * Get pending transaction(s) which meets all requirements.
      *
-     * @param array $aConditions an array of pears('key' => 'value'). The most useful keys are the following:
+     * @param $aConditions an array of pears('key' => 'value'). The most useful keys are the following:
      * a. client_id - client's ID (integer)
      * b. seller_id - seller's ID (integer)
      * c. type - transaction type: single or recurring (string)
@@ -86,8 +125,12 @@ class BxPaymentOrders extends BxBaseModPaymentOrders
      * f. provider - payment provider name (string)
      * g. date - the date when the payment was established(UNIXTIME STAMP)
      * h. processed - whether the payment was processed or not (integer, 0 or 1)
-     *
-     * @return array of pending transactions. Each transaction has full info(client ID, seller ID, type, date and so on)
+     * @return an array of pending transactions. Each transaction has full info(client ID, seller ID, type, date and so on)
+     * 
+     * @see BxPaymentOrders::serviceGetPendingOrdersInfo
+     */
+    /** 
+     * @ref bx_payment-get_pending_orders_info "get_pending_orders_info"
      */
     public function serviceGetPendingOrdersInfo($aConditions)
     {

+ 88 - 6
modules/boonex/payment/classes/BxPaymentSubscriptions.php

@@ -21,28 +21,103 @@ class BxPaymentSubscriptions extends BxBaseModPaymentSubscriptions
     /*
      * Service methods
      */
+    
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-page_blocks Page Blocks
+     * @subsubsection bx_payment-get_block_list_my get_block_list_my
+     * 
+     * @code bx_srv('bx_payment', 'get_block_list_my', [...], 'Subscriptions'); @endcode
+     * 
+     * Get page block with a list of currently logged in member's subscriptions.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPaymentSubscriptions::serviceGetBlockListMy
+     */
+    /** 
+     * @ref bx_payment-get_block_list_my "get_block_list_my"
+     */
     public function serviceGetBlockListMy()
     {
         return $this->_getBlock('list_my');
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-page_blocks Page Blocks
+     * @subsubsection bx_payment-get_block_list_all get_block_list_all
+     * 
+     * @code bx_srv('bx_payment', 'get_block_list_all', [...], 'Subscriptions'); @endcode
+     * 
+     * Get page block with a list of all subscriptions. It's available for authorized members only.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPaymentSubscriptions::serviceGetBlockListAll
+     */
+    /** 
+     * @ref bx_payment-get_block_list_all "get_block_list_all"
+     */
     public function serviceGetBlockListAll()
     {
         return $this->_getBlock('list_all');
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-page_blocks Page Blocks
+     * @subsubsection bx_payment-get_block_history get_block_history
+     * 
+     * @code bx_srv('bx_payment', 'get_block_history', [...], 'Subscriptions'); @endcode
+     * 
+     * Get page block with a list of payments related to subscriptions of currently logged in member.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPaymentSubscriptions::serviceGetBlockHistory
+     */
+    /** 
+     * @ref bx_payment-get_block_history "get_block_history"
+     */
     public function serviceGetBlockHistory()
     {
         return $this->_getBlock('history');
     }
 
-	public function serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount)
+	/**
+     * @page service Service Calls
+     * @section bx_payment Payment
+     * @subsection bx_payment-purchase_processing Purchase Processing
+     * @subsubsection bx_payment-subscribe subscribe
+     * 
+     * @code bx_srv('bx_payment', 'subscribe', [...], 'Subscriptions'); @endcode
+     * 
+     * Initialize subscription for specified item.
+     *
+     * @param $iSellerId integer value with seller ID.
+     * @param $sSellerProvider string value with a name of payment provider to be used for processing. Empty value means that payment provider selector should be shown.
+     * @param $iModuleId integer value with module ID.
+     * @param $iItemId integer value with item ID.
+     * @param $iItemCount integer value with a number of items for purchasing. It's equal to 1 in case of subscription.
+     * @param $sRedirect (optional) string value with redirect URL, if it's needed. 
+     * @return an array with special format which describes the result of operation.
+     * 
+     * @see BxPaymentSubscriptions::serviceSubscribe
+     */
+    /** 
+     * @ref bx_payment-subscribe "subscribe"
+     */
+	public function serviceSubscribe($iSellerId, $sSellerProvider, $iModuleId, $iItemId, $iItemCount, $sRedirect = '')
     {
     	$CNF = &$this->_oModule->_oConfig->CNF;
 
     	$iClientId = $this->_oModule->getProfileId();
 
-    	$mixedResult = $this->_checkData($iClientId, $iSellerId, $iModuleId, $iItemId, $iItemCount);
+    	$mixedResult = $this->_oModule->checkData($iClientId, $iSellerId, $iModuleId, $iItemId, $iItemCount);
     	if($mixedResult !== true)
     		return $mixedResult;
 
@@ -56,11 +131,14 @@ class BxPaymentSubscriptions extends BxBaseModPaymentSubscriptions
 		if(empty($sSellerProvider)) {
 			$sId = $this->_oModule->_oConfig->getHtmlIds('cart', 'providers_select') . BX_PAYMENT_TYPE_RECURRING;
 			$sTitle = _t($CNF['T']['POPUP_PROVIDERS_SELECT']);
-			return array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sId, $sTitle, $this->_oModule->_oTemplate->displayProvidersSelector($aCartItem, $aSellerProviders)));
+			return array('popup' => array(
+				'html' => BxTemplStudioFunctions::getInstance()->popupBox($sId, $sTitle, $this->_oModule->_oTemplate->displayProvidersSelector($aCartItem, $aSellerProviders, $sRedirect)), 
+				'options' => array('closeOnOuterClick' => true)
+			));
 		}
 
 		$aProvider = $aSellerProviders[$sSellerProvider];
-        $mixedResult = $this->_oModule->serviceInitializeCheckout(BX_PAYMENT_TYPE_RECURRING, $iSellerId, $aProvider['name'], array($sCartItem));
+        $mixedResult = $this->_oModule->serviceInitializeCheckout(BX_PAYMENT_TYPE_RECURRING, $iSellerId, $aProvider['name'], array($sCartItem), $sRedirect);
         if(is_string($mixedResult))
         	return array('code' => 6, 'message' => _t($mixedResult));
 
@@ -101,11 +179,15 @@ class BxPaymentSubscriptions extends BxBaseModPaymentSubscriptions
 
         $sMethod = 'displayBlockSbs' . bx_gen_method_name($sType);
         if(!method_exists($this->_oModule->_oTemplate, $sMethod))
-            return MsgBox(_t('_Empty'));
+            return array(
+        		'content' => MsgBox(_t('_Empty'))
+            );
 
     	$iUserId = $this->_oModule->getProfileId();
         if(empty($iUserId))
-            return MsgBox(_t($CNF['T']['ERR_REQUIRED_LOGIN']));
+            return array(
+        		'content' => MsgBox(_t($CNF['T']['ERR_REQUIRED_LOGIN']))
+            );
 
         $this->_oModule->setSiteSubmenu('menu_dashboard', 'system', 'dashboard-subscriptions');
 

+ 56 - 0
modules/boonex/polls/classes/BxPollsModule.php

@@ -50,6 +50,25 @@ class BxPollsModule extends BxBaseModTextModule
     /**
      * SERVICE METHODS
      */
+    
+    /**
+     * @page service Service Calls
+     * @section bx_polls Polls
+     * @subsection bx_polls-page_blocks Page Blocks
+     * @subsubsection bx_polls-get_results_search_extended get_results_search_extended
+     * 
+     * @code bx_srv('bx_polls', 'get_results_search_extended', [...]); @endcode
+     * 
+     * Get page block with the results of Extended Search.
+     *
+     * @param $aParams an array with search params.
+     * @return HTML string with block content to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPollsModule::serviceGetResultsSearchExtended
+     */
+    /** 
+     * @ref bx_polls-get_results_search_extended "get_results_search_extended"
+     */
     public function serviceGetResultsSearchExtended($aParams)
     {
         $this->_oTemplate->addJs(array('entry.js'));
@@ -57,6 +76,25 @@ class BxPollsModule extends BxBaseModTextModule
         return $this->_oTemplate->getJsCode('entry') . BxDolService::call('system', 'get_results', array($aParams), 'TemplSearchExtendedServices');
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_polls Polls
+     * @subsection bx_polls-page_blocks Page Blocks
+     * @subsubsection bx_polls-get_block_subentries get_block_subentries
+     * 
+     * @code bx_srv('bx_polls', 'get_block_subentries', [...]); @endcode
+     * 
+     * Get page block with poll questions.
+     *
+     * @param $iContentId (optional) poll's ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @param $bForceDisplay (optional) if true is passed then the block will be displayed as is (without checking whether user answered the poll or not).
+     * @return HTML string with block content to display on the site or false if there is no enough input data. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPollsModule::serviceGetBlockSubentries
+     */
+    /** 
+     * @ref bx_polls-get_block_subentries "get_block_subentries"
+     */
     public function serviceGetBlockSubentries($iContentId = 0, $bForceDisplay = false)
     {
         if (!$iContentId)
@@ -70,6 +108,24 @@ class BxPollsModule extends BxBaseModTextModule
         return $this->_serviceTemplateFunc('entrySubentries', $iContentId);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_polls Polls
+     * @subsection bx_polls-page_blocks Page Blocks
+     * @subsubsection bx_polls-get_block_results get_block_results
+     * 
+     * @code bx_srv('bx_polls', 'get_block_results', [...]); @endcode
+     * 
+     * Get page block with poll results.
+     *
+     * @param $iContentId (optional) poll's ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return HTML string with block content to display on the site or false if there is no enough input data. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxPollsModule::serviceGetBlockResults
+     */
+    /** 
+     * @ref bx_polls-get_block_results "get_block_results"
+     */
     public function serviceGetBlockResults($iContentId = 0)
     {
         return $this->_serviceTemplateFunc('entryResults', $iContentId);

+ 107 - 2
modules/boonex/shopify/classes/BxShopifyModule.php

@@ -36,17 +36,66 @@ class BxShopifyModule extends BxBaseModTextModule
         return $aSettings;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-integration Integration
+     * @subsubsection bx_shopify-include include
+     * 
+     * @code bx_srv('bx_shopify', 'include', [...]); @endcode
+     * 
+     * Get integration code with all necessary CSS and JS includes. 
+     *
+     * @return HTML sting with integration code to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxShopifyModule::serviceInclude
+     */
+    /** 
+     * @ref bx_shopify-include "include"
+     */
     public function serviceInclude($iProfileId = 0)
     {
         $this->serviceIncludeCssJs();
         return $this->serviceIncludeCode($iProfileId);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-integration Integration
+     * @subsubsection bx_shopify-include_css_js include_css_js
+     * 
+     * @code bx_srv('bx_shopify', 'include_css_js', [...]); @endcode
+     * 
+     * Include all necessary CSS and JS files.
+     * 
+     * @see BxShopifyModule::serviceIncludeCssJs
+     */
+    /** 
+     * @ref bx_shopify-include_css_js "include_css_js"
+     */
     public function serviceIncludeCssJs()
     {
         $this->_oTemplate->getIncludeCssJs();
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-integration Integration
+     * @subsubsection bx_shopify-include_code include_code
+     * 
+     * @code bx_srv('bx_shopify', 'include_code', [...]); @endcode
+     * 
+     * Get integration code. 
+     *
+     * @return HTML sting with integration code to display on the site. Empty string is returned if there is no enough input data.
+     * 
+     * @see BxShopifyModule::serviceIncludeCode
+     */
+    /** 
+     * @ref bx_shopify-include_code "include_code"
+     */
     public function serviceIncludeCode($iProfileId = 0)
     {
         $iProfileId = !empty($iProfileId) ? $iProfileId : $this->_iProfileId;
@@ -60,12 +109,47 @@ class BxShopifyModule extends BxBaseModTextModule
         return $this->_oTemplate->getIncludeCode($iProfileId, $aSettings);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-page_blocks Page Blocks
+     * @subsubsection bx_shopify-get_results_search_extended get_results_search_extended
+     * 
+     * @code bx_srv('bx_shopify', 'get_results_search_extended', [...]); @endcode
+     * 
+     * Get page block with the results of Extended Search.
+     *
+     * @param $aParams an array with search params.
+     * @return HTML string with block content to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxShopifyModule::serviceGetResultsSearchExtended
+     */
+    /** 
+     * @ref bx_shopify-get_results_search_extended "get_results_search_extended"
+     */
     public function serviceGetResultsSearchExtended($aParams)
     {
         $this->serviceIncludeCssJs();
         return BxDolService::call('system', 'get_results', array($aParams), 'TemplSearchExtendedServices');
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-page_blocks Page Blocks
+     * @subsubsection bx_shopify-entity_create entity_create
+     * 
+     * @code bx_srv('bx_shopify', 'entity_create', [...]); @endcode
+     * 
+     * Get page block with product creation form or an error message if something wasn't configured correctly.
+     *
+     * @return HTML string with block content to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxShopifyModule::serviceEntityCreate
+     */
+    /** 
+     * @ref bx_shopify-entity_create "entity_create"
+     */
     public function serviceEntityCreate ()
     {
         $CNF = &$this->_oConfig->CNF;
@@ -77,16 +161,37 @@ class BxShopifyModule extends BxBaseModTextModule
     	return parent::serviceEntityCreate();
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_shopify Shopify
+     * @subsection bx_shopify-page_blocks Page Blocks
+     * @subsubsection bx_shopify-settings settings
+     * 
+     * @code bx_srv('bx_shopify', 'settings', [...]); @endcode
+     * 
+     * Get page block with configuration settings form.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxShopifyModule::serviceSettings
+     */
+    /** 
+     * @ref bx_shopify-settings "settings"
+     */
     public function serviceSettings()
     {
         $CNF = &$this->_oConfig->CNF;
 
         if(!$this->_iProfileId)
-            return MsgBox(_t('_Access denied'));
+            return array(
+        		'content' => MsgBox(_t('_Access denied'))
+            );
 
         $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_SETTINGS'], $CNF['OBJECT_FORM_SETTINGS_DISPLAY_EDIT'], $this->_oTemplate);
         if(!$oForm)
-            return MsgBox(_t('_sys_txt_error_occured'));       
+            return array(
+        		'content' => MsgBox(_t('_sys_txt_error_occured'))
+            );       
 
         $aSettings = $this->_oDb->getSettings(array('type' => 'author', 'author' => $this->_iProfileId));
         $bSettings = !empty($aSettings) && is_array($aSettings);

+ 68 - 0
modules/boonex/snipcart/classes/BxSnipcartModule.php

@@ -40,6 +40,23 @@ class BxSnipcartModule extends BxBaseModTextModule
         return $aSettings;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_snipcart Snipcart
+     * @subsection bx_snipcart-other Other
+     * @subsubsection bx_snipcart-get_searchable_fields get_searchable_fields
+     * 
+     * @code bx_srv('bx_snipcart', 'get_searchable_fields', [...]); @endcode
+     * 
+     * Get a list of searchable fields. Is used in common search engine. 
+     *
+     * @return an array with a list of searchable fields.
+     * 
+     * @see BxSnipcartModule::serviceGetSearchableFields
+     */
+    /** 
+     * @ref bx_snipcart-get_searchable_fields "get_searchable_fields"
+     */
     public function serviceGetSearchableFields ()
     {
         $CNF = &$this->_oConfig->CNF;
@@ -50,6 +67,23 @@ class BxSnipcartModule extends BxBaseModTextModule
         return $aResult;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_snipcart Snipcart
+     * @subsection bx_snipcart-integration Integration
+     * @subsubsection bx_snipcart-include_css_js include_css_js
+     * 
+     * @code bx_srv('bx_snipcart', 'include_css_js', [...]); @endcode
+     * 
+     * Get integration code with all necessary CSS and JS includes. 
+     *
+     * @return HTML sting with integration code to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML. Empty string is returned if there is no enough input data.
+     * 
+     * @see BxSnipcartModule::serviceIncludeCssJs
+     */
+    /** 
+     * @ref bx_snipcart-include_css_js "include_css_js"
+     */
     public function serviceIncludeCssJs($iProfileId = 0)
     {
         $iProfileId = !empty($iProfileId) ? $iProfileId : $this->_iProfileId;
@@ -59,6 +93,23 @@ class BxSnipcartModule extends BxBaseModTextModule
         return $this->_oTemplate->getSctInclude($iProfileId);
     }
 
+	/**
+     * @page service Service Calls
+     * @section bx_snipcart Snipcart
+     * @subsection bx_snipcart-page_blocks Page Blocks
+     * @subsubsection bx_snipcart-entity_create entity_create
+     * 
+     * @code bx_srv('bx_snipcart', 'entity_create', [...]); @endcode
+     * 
+     * Get page block with product creation form or an error message if something wasn't configured correctly.
+     *
+     * @return HTML string with block content to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxSnipcartModule::serviceEntityCreate
+     */
+    /** 
+     * @ref bx_snipcart-entity_create "entity_create"
+     */
     public function serviceEntityCreate ()
     {
         $CNF = &$this->_oConfig->CNF;
@@ -70,6 +121,23 @@ class BxSnipcartModule extends BxBaseModTextModule
     	return parent::serviceEntityCreate();
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_snipcart Snipcart
+     * @subsection bx_snipcart-page_blocks Page Blocks
+     * @subsubsection bx_snipcart-settings settings
+     * 
+     * @code bx_srv('bx_snipcart', 'settings', [...]); @endcode
+     * 
+     * Get page block with configuration settings form.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxSnipcartModule::serviceSettings
+     */
+    /** 
+     * @ref bx_snipcart-settings "settings"
+     */
     public function serviceSettings()
     {
         $CNF = &$this->_oConfig->CNF;

+ 84 - 1
modules/boonex/stripe_connect/classes/BxStripeConnectModule.php

@@ -26,6 +26,23 @@ class BxStripeConnectModule extends BxBaseModConnectModule
         $this->_oConfig->init($this->_oDb);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_stripe_connect Stripe Connect
+     * @subsection bx_stripe_connect-other Other
+     * @subsubsection bx_stripe_connect-get_options_mode get_options_mode
+     * 
+     * @code bx_srv('bx_stripe_connect', 'get_options_mode', [...]); @endcode
+     * 
+     * Get an array with available modes. Is used in forms.
+     *
+     * @return an array with available modes represented as key => value pairs.
+     * 
+     * @see BxStripeConnectModule::serviceGetOptionsMode
+     */
+    /** 
+     * @ref bx_stripe_connect-get_options_mode "get_options_mode"
+     */
     public function serviceGetOptionsMode()
     {
         return array(
@@ -34,6 +51,23 @@ class BxStripeConnectModule extends BxBaseModConnectModule
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_stripe_connect Stripe Connect
+     * @subsection bx_stripe_connect-other Other
+     * @subsubsection bx_stripe_connect-get_options_api_scope get_options_api_scope
+     * 
+     * @code bx_srv('bx_stripe_connect', 'get_options_api_scope', [...]); @endcode
+     * 
+     * Get an array with available API scopes. Is used in forms.
+     *
+     * @return an array with available scopes represented as key => value pairs.
+     * 
+     * @see BxStripeConnectModule::serviceGetOptionsApiScope
+     */
+    /** 
+     * @ref bx_stripe_connect-get_options_api_scope "get_options_api_scope"
+     */
     public function serviceGetOptionsApiScope()
     {
         return array(
@@ -42,6 +76,23 @@ class BxStripeConnectModule extends BxBaseModConnectModule
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_stripe_connect Stripe Connect
+     * @subsection bx_stripe_connect-other Other
+     * @subsubsection bx_stripe_connect-get_options_pmode_single get_options_pmode_single
+     * 
+     * @code bx_srv('bx_stripe_connect', 'get_options_pmode_single', [...]); @endcode
+     * 
+     * Get an array with available processing modes for single time payments. Is used in forms.
+     *
+     * @return an array with available modes represented as key => value pairs.
+     * 
+     * @see BxStripeConnectModule::serviceGetOptionsPmodeSingle
+     */
+    /** 
+     * @ref bx_stripe_connect-get_options_pmode_single "get_options_pmode_single"
+     */
     public function serviceGetOptionsPmodeSingle()
     {
         return array(
@@ -51,7 +102,22 @@ class BxStripeConnectModule extends BxBaseModConnectModule
     }
 
     /**
-     * Note. Subscriptions do not currently support the Platform mode.
+     * @page service Service Calls
+     * @section bx_stripe_connect Stripe Connect
+     * @subsection bx_stripe_connect-other Other
+     * @subsubsection bx_stripe_connect-get_options_pmode_recurring get_options_pmode_recurring
+     * 
+     * @code bx_srv('bx_stripe_connect', 'get_options_pmode_recurring', [...]); @endcode
+     * 
+     * Get an array with available processing modes for recurring payments. Is used in forms.
+     * Note. Subscriptions (recurring payments) do not currently support the Platform mode.
+     *
+     * @return an array with available modes represented as key => value pairs.
+     * 
+     * @see BxStripeConnectModule::serviceGetOptionsPmodeRecurring
+     */
+    /** 
+     * @ref bx_stripe_connect-get_options_pmode_recurring "get_options_pmode_recurring"
      */
     public function serviceGetOptionsPmodeRecurring()
     {
@@ -60,6 +126,23 @@ class BxStripeConnectModule extends BxBaseModConnectModule
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_stripe_connect Stripe Connect
+     * @subsection bx_stripe_connect-page_blocks Page Blocks
+     * @subsubsection bx_stripe_connect-get_block_connect get_block_connect
+     * 
+     * @code bx_srv('bx_stripe_connect', 'get_block_connect', [...]); @endcode
+     * 
+     * Get page block with necessary info and actions to connect/disconnect.
+     *
+     * @return HTML string with block content to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxStripeConnectModule::serviceGetBlockConnect
+     */
+    /** 
+     * @ref bx_stripe_connect-get_block_connect "get_block_connect"
+     */
     public function serviceGetBlockConnect()
     {
     	return $this->_oTemplate->displayBlockConnect();

+ 577 - 4
modules/boonex/timeline/classes/BxTimelineModule.php

@@ -335,6 +335,24 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
     /**
      * SERVICE METHODS
      */
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_author get_author
+     * 
+     * @code bx_srv('bx_timeline', 'get_author', [...]); @endcode
+     * 
+     * Get author ID from content info by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @return integer value with author ID.
+     * 
+     * @see BxTimelineModule::serviceGetAuthor
+     */
+    /** 
+     * @ref bx_timeline-get_author "get_author"
+     */
     public function serviceGetAuthor ($iContentId)
     {
         $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
@@ -344,11 +362,48 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_oConfig->isSystem($aEvent['type'], $aEvent['action']) ? (int)$aEvent['owner_id'] : (int)$aEvent['object_id'];
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_date_changed get_date_changed
+     * 
+     * @code bx_srv('bx_timeline', 'get_date_changed', [...]); @endcode
+     * 
+     * Get date when the content was changed last time. Is used in "Content Info Objects" system.
+     * Note. In case of Timeline event 0 is returned everytime.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @return integer value with changing date.
+     * 
+     * @see BxTimelineModule::serviceGetDateChanged
+     */
+    /** 
+     * @ref bx_timeline-get_date_changed "get_date_changed"
+     */
     public function serviceGetDateChanged ($iContentId)
     {
         return 0;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_link get_link
+     * 
+     * @code bx_srv('bx_timeline', 'get_link', [...]); @endcode
+     * 
+     * Get content view page link. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @return string value with view page link.
+     * 
+     * @see BxTimelineModule::serviceGetLink
+     */
+    /** 
+     * @ref bx_timeline-get_link "get_link"
+     */
     public function serviceGetLink ($iContentId)
     {
         $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
@@ -358,11 +413,50 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_oConfig->getItemViewUrl($aEvent);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_thumb get_thumb
+     * 
+     * @code bx_srv('bx_timeline', 'get_thumb', [...]); @endcode
+     * 
+     * Get content thumbnail link. Is used in "Content Info Objects" system.
+     * Note. In case of Timeline event an empty string is returned everytime.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $sTranscoder (optional) string value with transcoder name which should be applied to thumbnail image.
+     * @return string value with thumbnail link.
+     * 
+     * @see BxTimelineModule::serviceGetThumb
+     */
+    /** 
+     * @ref bx_timeline-get_thumb "get_thumb"
+     */
     public function serviceGetThumb ($iContentId, $sTranscoder = '') 
     {
         return '';
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_info get_info
+     * 
+     * @code bx_srv('bx_timeline', 'get_info', [...]); @endcode
+     * 
+     * Get content info by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $bSearchableFieldsOnly (optional) boolean value determining all info or "searchable fields" only will be returned.
+     * @return an array with content info. Empty array is returned if something is wrong.
+     * 
+     * @see BxTimelineModule::serviceGetInfo
+     */
+    /** 
+     * @ref bx_timeline-get_info "get_info"
+     */
     public function serviceGetInfo ($iContentId, $bSearchableFieldsOnly = true)
     {
         $aContentInfo = $this->_oDb->getEvents(array(
@@ -373,6 +467,25 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return BxDolContentInfo::formatFields($aContentInfo);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_search_result_unit get_search_result_unit
+     * 
+     * @code bx_srv('bx_timeline', 'get_search_result_unit', [...]); @endcode
+     * 
+     * Get search result unit by content ID. Is used in "Content Info Objects" system.
+     * 
+     * @param $iContentId integer value with content ID.
+     * @param $sUnitTemplate (optional) string value with template name.
+     * @return HTML string with search result unit. Empty string is returned if something is wrong.
+     * 
+     * @see BxTimelineModule::serviceGetSearchResultUnit
+     */
+    /** 
+     * @ref bx_timeline-get_search_result_unit "get_search_result_unit"
+     */
     public function serviceGetSearchResultUnit ($iContentId, $sUnitTemplate = '')
     {
         $aEvent = $this->_oDb->getEvents(array('browse' => 'id', 'value' => $iContentId));
@@ -386,7 +499,22 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
     }
 
     /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post get_block_post
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post', [...]); @endcode
+     * 
      * Get Post block for a separate page.
+     *
+     * @param $iProfileId (optional) profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPost
+     */
+    /** 
+     * @ref bx_timeline-get_block_post "get_block_post"
      */
     public function serviceGetBlockPost($iProfileId = 0)
     {
@@ -402,6 +530,25 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_getBlockPost($iProfileId);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post_profile get_block_post_profile
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post_profile', [...]); @endcode
+     * 
+     * Get Post block for the Profile page.
+     *
+     * @param $sProfileModule (optional) string value with profile based module name. Persons module is used by default.
+     * @param $iProfileContentId (optional) profile's content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPostProfile
+     */
+    /** 
+     * @ref bx_timeline-get_block_post_profile "get_block_post_profile"
+     */
     public function serviceGetBlockPostProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0)
     {
         if(empty($sProfileModule))
@@ -417,6 +564,23 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
 		return $this->_getBlockPost($oProfile->id());
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post_home get_block_post_home
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post_home', [...]); @endcode
+     * 
+     * Get Post block for site's Home page.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPostHome
+     */
+    /** 
+     * @ref bx_timeline-get_block_post_home "get_block_post_home"
+     */
     public function serviceGetBlockPostHome()
     {
         $iProfileId = 0;
@@ -425,6 +589,23 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         ));
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_post_account get_block_post_account
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_post_account', [...]); @endcode
+     * 
+     * Get Post block for the Dashboard page.
+     *
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockPostAccount
+     */
+    /** 
+     * @ref bx_timeline-get_block_post_account "get_block_post_account"
+     */
     public function serviceGetBlockPostAccount()
     {
         if(!isLogged())
@@ -434,19 +615,76 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
 		return $this->_getBlockPost($iProfileId);
     }
 
-    /*
-     * Get View block for a separate page. Will return a block with "Empty" message if nothing found.
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view get_block_view
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view', [...]); @endcode
+     * 
+     * Get Timeline View block for a separate page.
+     *
+     * @param $iProfileId (optional) profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockView
+     */
+    /** 
+     * @ref bx_timeline-get_block_view "get_block_view"
      */
     public function serviceGetBlockView($iProfileId = 0)
     {
     	return $this->_serviceGetBlockView($iProfileId, BX_TIMELINE_VIEW_TIMELINE);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_outline get_block_view_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_outline', [...]); @endcode
+     * 
+     * Get Outline View block for a separate page.
+     * 
+     * @param $iProfileId (optional) profile ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_outline "get_block_view_outline"
+     */
     public function serviceGetBlockViewOutline($iProfileId = 0)
     {
         return $this->_serviceGetBlockView($iProfileId, BX_TIMELINE_VIEW_OUTLINE);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_profile get_block_view_profile
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_profile', [...]); @endcode
+     * 
+     * Get Timeline View block for the Profile page.
+     * 
+     * @param $sProfileModule (optional) string value with profile based module name. Persons module is used by default.
+     * @param $iProfileContentId (optional) profile's content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewProfile
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_profile "get_block_view_profile"
+     */
     public function serviceGetBlockViewProfile($sProfileModule = 'bx_persons', $iProfileContentId = 0, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
     {
         $sView = BX_TIMELINE_VIEW_TIMELINE;
@@ -454,6 +692,30 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_serviceGetBlockViewProfile($sProfileModule, $iProfileContentId, $sView, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_profile_outline get_block_view_profile_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_profile_outline', [...]); @endcode
+     * 
+     * Get Outline View block for the Profile page.
+     * 
+     * @param $sProfileModule (optional) string value with profile based module name. Persons module is used by default.
+     * @param $iProfileContentId (optional) profile's content ID. If empty value is provided, an attempt to get it from GET/POST arrays will be performed.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewProfileOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_profile_outline "get_block_view_profile_outline"
+     */
 	public function serviceGetBlockViewProfileOutline($sProfileModule = 'bx_persons', $iProfileContentId = 0, $iStart = -1, $iPerPage = -1, $sFilter = '', $aModules = array(), $iTimeline = -1)
     {
         $sView = BX_TIMELINE_VIEW_OUTLINE;
@@ -461,16 +723,85 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_serviceGetBlockViewProfile($sProfileModule, $iProfileContentId, $sView, $iStart, $iPerPage, $sFilter, $aModules, $iTimeline);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_home get_block_view_home
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_home', [...]); @endcode
+     * 
+     * Get Timeline View block for site's Home page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewHome
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_home "get_block_view_home"
+     */
     public function serviceGetBlockViewHome($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
     {
         return $this->_serviceGetBlockViewHome($iProfileId, BX_TIMELINE_VIEW_TIMELINE, $iStart, $iPerPage, $this->_oConfig->getPerPage('home'), $iTimeline, $sFilter, $aModules);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_home_outline get_block_view_home_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_home_outline', [...]); @endcode
+     * 
+     * Get Outline View block for site's Home page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewHomeOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_home_outline "get_block_view_home_outline"
+     */
 	public function serviceGetBlockViewHomeOutline($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
     {
         return $this->_serviceGetBlockViewHome($iProfileId, BX_TIMELINE_VIEW_OUTLINE, $iStart, $iPerPage, $this->_oConfig->getPerPage('home'), $iTimeline, $sFilter, $aModules);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_account get_block_view_account
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_account', [...]); @endcode
+     * 
+     * Get Timeline View block for the Dashboard page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewAccount
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_account "get_block_view_account"
+     */
     public function serviceGetBlockViewAccount($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
     {
         if(!isLogged())
@@ -479,6 +810,29 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_serviceGetBlockViewByType($iProfileId, BX_TIMELINE_VIEW_TIMELINE, BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS, $iStart, $iPerPage, $this->_oConfig->getPerPage('account'), $iTimeline, $sFilter, $aModules);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_view_account_outline get_block_view_account_outline
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_view_account_outline', [...]); @endcode
+     * 
+     * Get Outline View block for the Dashboard page.
+     * 
+     * @param $iProfileId (optional) profile ID. 0 should be used here.
+     * @param $iStart (optional) integer value with a page number. Is used in pagination.
+     * @param $iPerPage (optional) integer value with a number of items per page. Is used in pagination.
+     * @param $iTimeline (optional) integer value determining whether the timeline should be displayed or not. 
+     * @param $sFilter (optional) string value with filter name.
+     * @param $aModules (optional) an array of modules from which the events should be displayed. All available modules are used by default.
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockViewAccountOutline
+     */
+    /** 
+     * @ref bx_timeline-get_block_view_account_outline "get_block_view_account_outline"
+     */
     public function serviceGetBlockViewAccountOutline($iProfileId = 0, $iStart = -1, $iPerPage = -1, $iTimeline = -1, $sFilter = '', $aModules = array())
     {
         if(!isLogged())
@@ -487,6 +841,23 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_serviceGetBlockViewByType($iProfileId, BX_TIMELINE_VIEW_OUTLINE, BX_TIMELINE_TYPE_OWNER_AND_CONNECTIONS, $iStart, $iPerPage, $this->_oConfig->getPerPage('account'), $iTimeline, $sFilter, $aModules);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-page_blocks Page Blocks
+     * @subsubsection bx_timeline-get_block_item get_block_item
+     * 
+     * @code bx_srv('bx_timeline', 'get_block_item', [...]); @endcode
+     * 
+     * Get View Item block.
+     * 
+     * @return an array describing a block to display on the site. All necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetBlockItem
+     */
+    /** 
+     * @ref bx_timeline-get_block_item "get_block_item"
+     */
     public function serviceGetBlockItem()
     {
         $iItemId = bx_process_input(bx_get('id'), BX_DATA_INT);
@@ -496,8 +867,22 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_oTemplate->getItemBlock($iItemId);
     }
 
-	/**
-     * Data for Notifications module
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_data get_notifications_data
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_data', [...]); @endcode
+     * 
+     * Data for Notifications module.
+     * 
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsData
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_data "get_notifications_data"
      */
     public function serviceGetNotificationsData()
     {
@@ -527,6 +912,24 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         );
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_repost get_notifications_repost
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_repost', [...]); @endcode
+     * 
+     * Get data for Repost event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsRepost
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_repost "get_notifications_repost"
+     */
     public function serviceGetNotificationsRepost($aEvent)
     {
         $aResult = $this->serviceGetNotificationsPost($aEvent);
@@ -535,6 +938,24 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $aResult;
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_post get_notifications_post
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_post', [...]); @endcode
+     * 
+     * Get data for Post event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsPost
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_post "get_notifications_post"
+     */
     public function serviceGetNotificationsPost($aEvent)
     {
     	$CNF = &$this->_oConfig->CNF;
@@ -555,6 +976,24 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
 		);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_comment get_notifications_comment
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_comment', [...]); @endcode
+     * 
+     * Get data for Post Comment event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsComment
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_comment "get_notifications_comment"
+     */
     public function serviceGetNotificationsComment($aEvent)
     {
     	$CNF = &$this->_oConfig->CNF;
@@ -581,6 +1020,24 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
 		);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-integration_notifications Integration with Notifications
+     * @subsubsection bx_timeline-get_notifications_vote get_notifications_vote
+     * 
+     * @code bx_srv('bx_timeline', 'get_notifications_vote', [...]); @endcode
+     * 
+     * Get data for Vote event to display in Notifications module.
+     * 
+     * @param $aEvent an array with event description.
+     * @return an array with special format.
+     * 
+     * @see BxTimelineModule::serviceGetNotificationsVote
+     */
+    /** 
+     * @ref bx_timeline-get_notifications_vote "get_notifications_vote"
+     */
     public function serviceGetNotificationsVote($aEvent)
     {
     	$CNF = &$this->_oConfig->CNF;
@@ -606,6 +1063,28 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
 		);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_element_block get_repost_element_block
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_element_block', [...]); @endcode
+     * 
+     * Get repost element for content based modules.
+     * 
+     * @param $iOwnerId integer value with owner profile ID.
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @param $aParams (optional) an array with additional params.
+     * @return HTML string with repost element to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetRepostElementBlock
+     */
+    /** 
+     * @ref bx_timeline-get_repost_element_block "get_repost_element_block"
+     */
     public function serviceGetRepostElementBlock($iOwnerId, $sType, $sAction, $iObjectId, $aParams = array())
     {
     	if(!$this->isEnabled())
@@ -615,6 +1094,26 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_oTemplate->getRepostElement($iOwnerId, $sType, $sAction, $iObjectId, $aParams);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_counter get_repost_counter
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_counter', [...]); @endcode
+     * 
+     * Get repost counter.
+     * 
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @return HTML string with repost counter to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetRepostCounter
+     */
+    /** 
+     * @ref bx_timeline-get_repost_counter "get_repost_counter"
+     */
     public function serviceGetRepostCounter($sType, $sAction, $iObjectId)
     {
     	if(!$this->isEnabled())
@@ -625,6 +1124,23 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_oTemplate->getRepostCounter($aReposted);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_js_script get_repost_js_script
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_js_script', [...]); @endcode
+     * 
+     * Get repost JavaScript code.
+     * 
+     * @return HTML string with JavaScript code to display on the site, all necessary CSS and JS files are automatically added to the HEAD section of the site HTML.
+     * 
+     * @see BxTimelineModule::serviceGetRepostJsScript
+     */
+    /** 
+     * @ref bx_timeline-get_repost_js_script "get_repost_js_script"
+     */
     public function serviceGetRepostJsScript()
     {
     	if(!$this->isEnabled())
@@ -633,6 +1149,27 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_oTemplate->getRepostJsScript();
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-repost Repost
+     * @subsubsection bx_timeline-get_repost_js_click get_repost_js_click
+     * 
+     * @code bx_srv('bx_timeline', 'get_repost_js_click', [...]); @endcode
+     * 
+     * Get repost JavaScript code for OnClick event.
+     * 
+     * @param $iOwnerId integer value with owner profile ID.
+     * @param $sType string value with type (module name). 
+     * @param $sAction string value with action (module action). 
+     * @param $iObjectId integer value with object ID to be reposted. 
+     * @return HTML string with JavaScript code to display in OnClick events of HTML elements.
+     * 
+     * @see BxTimelineModule::serviceGetRepostJsClick
+     */
+    /** 
+     * @ref bx_timeline-get_repost_js_click "get_repost_js_click"
+     */
     public function serviceGetRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId)
     {
     	if(!$this->isEnabled())
@@ -641,6 +1178,25 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         return $this->_oTemplate->getRepostJsClick($iOwnerId, $sType, $sAction, $iObjectId);
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_menu_item_addon_comment get_menu_item_addon_comment
+     * 
+     * @code bx_srv('bx_timeline', 'get_menu_item_addon_comment', [...]); @endcode
+     * 
+     * Get addon for Comment menu item.
+     * 
+     * @param $sSystem string value with comments engine system.
+     * @param $iObjectId integer value with object ID. 
+     * @return HTML string to display in menu item.
+     * 
+     * @see BxTimelineModule::serviceGetMenuItemAddonComment
+     */
+    /** 
+     * @ref bx_timeline-get_menu_item_addon_comment "get_menu_item_addon_comment"
+     */
     public function serviceGetMenuItemAddonComment($sSystem, $iObjectId)
     {
         if(empty($sSystem) || empty($iObjectId))
@@ -657,6 +1213,23 @@ class BxTimelineModule extends BxBaseModNotificationsModule implements iBxDolCon
         ));
     }
 
+    /**
+     * @page service Service Calls
+     * @section bx_timeline Timeline
+     * @subsection bx_timeline-other Other
+     * @subsubsection bx_timeline-get_settings_checker_helper get_settings_checker_helper
+     * 
+     * @code bx_srv('bx_timeline', 'get_settings_checker_helper', [...]); @endcode
+     * 
+     * Get Checker Helper class name for Forms engine.
+     * 
+     * @return string with Checker Helper class name.
+     * 
+     * @see BxTimelineModule::serviceGetSettingsCheckerHelper
+     */
+    /** 
+     * @ref bx_timeline-get_settings_checker_helper "get_settings_checker_helper"
+     */
     public function serviceGetSettingsCheckerHelper()
     {
         bx_import('FormCheckerHelper', $this->_aModule);