API - XOOPS 2.5.11 Beta 2
By monxoops.fr
notification_functions.php File Reference

Namespaces

namespace  kernel
 

Functions

 notificationEnabled ($style, $module_id=null)
 
notificationCategoryInfo ($category_name='', $module_id=null)
 
notificationCommentCategoryInfo ($module_id=null)
 
 notificationEventEnabled (&$category, &$event, &$module)
 
notificationEventInfo ($category_name, $event_name, $module_id=null)
 
notificationSubscribableCategoryInfo ($module_id=null)
 
 notificationGenerateConfig (&$category, &$event, $type)
 

Function Documentation

◆ notificationCategoryInfo()

& notificationCategoryInfo (   $category_name = '',
  $module_id = null 
)

Get an associative array of info for a particular notification category in the selected module. If no category is selected, return an array of info for all categories.

Parameters
string$category_name
int$module_idID of the module (default current module)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ notificationCommentCategoryInfo()

& notificationCommentCategoryInfo (   $module_id = null)

Get associative array of info for the category to which comment events belong.

Todo:
This could be more efficient... maybe specify in $modversion['comments'] the notification category. This would also serve as a way to enable notification of comments, and also remove the restriction that all notification categories must have unique item_name. (TODO)
Parameters
int$module_idID of the module (default current module)
Returns
mixed Associative array of category info
Here is the call graph for this function:

◆ notificationEnabled()

notificationEnabled (   $style,
  $module_id = null 
)

Determine if notification is enabled for the selected module.

Parameters
string$styleSubscription style: 'block' or 'inline'
int$module_idID of the module (default current module)
Returns
bool
Here is the call graph for this function:
Here is the caller graph for this function:

◆ notificationEventEnabled()

notificationEventEnabled ( $category,
$event,
$module 
)

Determine whether a particular notification event is enabled. Depends on module config options.

Todo:
Check that this works correctly for comment and other events which depend on additional config options...
Parameters
array$categoryCategory info array
array$eventEvent info array
object$moduleModule
Returns
bool
Here is the call graph for this function:

◆ notificationEventInfo()

& notificationEventInfo (   $category_name,
  $event_name,
  $module_id = null 
)

Get associative array of info for the selected event in the selected category (for the selected module).

Parameters
string$category_nameNotification category
string$event_nameNotification event
int$module_idID of the module (default current module)
Returns
mixed
Here is the caller graph for this function:

◆ notificationGenerateConfig()

notificationGenerateConfig ( $category,
$event,
  $type 
)

Generate module config info for a particular category, event pair. The selectable config options are given names depending on the category and event names, and the text depends on the category and event titles. These are pieced together in this function in case we wish to alter the syntax.

Parameters
array$categoryArray of category info
array$eventArray of event info
string$typeThe particular name to generate return string
Returns
bool|string
Here is the caller graph for this function:

◆ notificationSubscribableCategoryInfo()

& notificationSubscribableCategoryInfo (   $module_id = null)

Get an array of associative info arrays for subscribable categories for the selected module.

Parameters
int$module_idID of the module
Returns
mixed
Here is the call graph for this function:
Here is the caller graph for this function: