Public Member Functions | |
__construct () | |
Only enable if notification enabled. | |
member ($member_id=NULL) | |
Notification setting for member. | |
members ($message_id=NULL) | |
Activates notifications for members. | |
subnet ($subnet_id=NULL, $message_id=NULL) | |
Notification setting to subnet. | |
cloud ($cloud_id=NULL, $message_id=NULL) | |
Notification setting to cloud. | |
device ($device_id=NULL) | |
Notification setting for device admins. | |
devices ($message_id=NULL) | |
Notification setting for devices admins. | |
Public Member Functions inherited from Controller | |
is_user_in_group ($aro_group_id, $aro_id) | |
Checks if user is in ARO group. | |
acl_check_view ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) | |
Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may view all $axo_value object in $axo_section else return false. | |
acl_check_edit ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) | |
Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may edit all $axo_value object in $axo_section else return false. | |
acl_check_new ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) | |
Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may add all $axo_value object in $axo_section else return false. | |
acl_check_delete ($axo_section, $axo_value, $member_id=NULL, $force_own=FALSE) | |
Fuction checks access rights Return true if currently logged user (stored in $_SESSION['user_id']) may view own $axo_value object in $axo_section (and in variable $member_id is his own id of member) or if currently logged user may delete all $axo_value object in $axo_section else return false. | |
build_menu () | |
Build menu. | |
url () | |
Return URL for controller and method. | |
redirect ($uri=NULL, $id=NULL, $glue= '/') | |
Redirects to uri according to attribute noredirect. |
Static Public Member Functions | |
static | notify (Message_Model $message, $members, $user_id=NULL, $comment=NULL, $activate_redir=TRUE, $activate_email=TRUE, $activate_sms=TRUE, $truncate_redir=FALSE, $remove_redir=FALSE, $notify_former_members=FALSE, $notify_interrupted_members=FALSE, $notification_type=self::TYPE_MEMBER, $ignore_member_notif_settings=FALSE) |
Activate notification of message for the given memebers and given restrictions. | |
static | notify_from_form (Message_Model $message, $user_id, $comment, $to_redirect, $to_notify_by_email, $to_notify_by_sms, $notification_type=self::TYPE_MEMBER) |
Transform the result of notification form that is used in many controllers (Message_Controller::activate, Notifications_Controller::members, ...) to the form that is acceptable by notify method and make notification by using notify menthod of this class. | |
Static Public Member Functions inherited from Controller | |
static & | instance () |
Singleton instance of Controller. | |
static | error ($message_type, $content=NULL) |
Function shows error of given message number. | |
static | warning ($message_type, $content=NULL) |
Function shows warning of given message number. |
Public Attributes | |
const | ACTIVATE = 1 |
activate notification | |
const | KEEP = 2 |
keep current settings | |
const | DEACTIVATE = 3 |
deactivate notification | |
const | TYPE_MEMBER = 1 |
Notification is applicated on members (all its users) | |
const | TYPE_USER = 2 |
Notification is applicated on users. | |
Public Attributes inherited from Controller | |
const | ICON_ERROR = 1 |
const | ICON_GOOD = 2 |
const | ICON_HELP = 3 |
const | ICON_INFO = 4 |
const | ICON_WARNING = 5 |
$arr | |
$settings = NULL | |
$popup = 0 | |
$dialog = 0 | |
$noredirect = FALSE | |
$user_has_voip = 0 | |
$ip_address_span = '' | |
$unread_user_mails = 0 | |
$count_of_unclosed_logged_errors = 0 | |
$devices_down_count = 0 | |
$user_favourites_pages = NULL | |
$axo_doc_access = FALSE |
Additional Inherited Members | |
Protected Member Functions inherited from Controller | |
is_preprocesor_enabled () | |
This methods defines whether the preprocessor of MY_Controller is loaded or not. | |
Protected Attributes inherited from Controller | |
$member_id | |
$user_id | |
$member_account_id = 1 | |
$session |
Notifications_Controller::cloud | ( | $cloud_id = NULL , |
|
$message_id = NULL |
|||
) |
Notification setting to cloud.
integer | $cloud_id |
Notifications_Controller::device | ( | $device_id = NULL | ) |
Notification setting for device admins.
integer | $device_id |
Notifications_Controller::devices | ( | $message_id = NULL | ) |
Notification setting for devices admins.
integer | $message_id |
Notifications_Controller::member | ( | $member_id = NULL | ) |
Notification setting for member.
integer | $member_id |
Notifications_Controller::members | ( | $message_id = NULL | ) |
Activates notifications for members.
integer | $message_id |
|
static |
Activate notification of message for the given memebers and given restrictions.
This method checks internally if redir/e-mail/sms are enabled.
Message_Model | $message | Message that should be notified |
array | $members | Array of members object (Database_Result or Member_model or some associative array) that contains properties: member_id, whitelisted |
integer | $user_id | Who notify or on empty association main user [optional] |
string | $comment | Comment for the message [optional] |
boolean | $activate_redir | Should be redirection activated [optional] |
boolean | $activate_email | Should be E-mail activated [optional] |
boolean | $activate_sms | Should be SMS activated [optional] |
boolean | $truncate_redir | Should be all redirection of this type removed before adding [optional] |
boolean | $remove_redir | This option my be set to TRUE only for removing of redirection for some members. Commonly it is used with previous bool params setted to FALSE for deactivation. [optional] |
boolean | $notify_former_members | Can be former members notified? [optional] |
boolean | $notify_interrupted_members | Can be interrupted members notified? [optional] |
integer | $notification_type | Defines type of notification:
|
boolean | $ignore_member_notif_settings | Should be member notification setting ignored? |
Exception | On any error with translated message |
|
static |
Transform the result of notification form that is used in many controllers (Message_Controller::activate, Notifications_Controller::members, ...) to the form that is acceptable by notify method and make notification by using notify menthod of this class.
This method checks internally if redir/e-mail/sms are enabled.
Message_Model | $message | Message that should be notified |
integer | $user_id | Who notify or on empty association main user |
string | $comment | Comment for the message |
array | $to_redirect | Array with affected member IDs or user IDs as key and each value is one of the KEEP, ACTIVATE and DEACTIVATE constants |
array | $to_notify_by_email | Array with affected member IDs or user IDs as key and each value is one of the KEEP, ACTIVATE constants |
array | $to_notify_by_sms | Array with affected member IDs or user IDs as key and each value is one of the KEEP, ACTIVATE constants |
integer | $notification_type | Defines type of notification:
|
Exception | On any error with translated message |
Notifications_Controller::subnet | ( | $subnet_id = NULL , |
|
$message_id = NULL |
|||
) |
Notification setting to subnet.
integer | $subnet_id |