Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
tool_monitor\subscription Class Reference

Class represents a single subscription instance (i.e with all the subscription info). More...

Public Member Functions

 __construct ($subscription)
 Constructor.
 
 __get ($prop)
 Magic get method.
 
 __isset ($prop)
 Magic isset method.
 
 can_manage_rule ()
 Can the current user manage the rule associate with this subscription?
 
 get_course_name (\context $context)
 Get properly formatted name of the course associated.
 
 get_description (\context $context)
 Get properly formatted description of the rule associated.
 
 get_event_name ()
 Method to get event name.
 
 get_filters_description ()
 Get filter description.
 
 get_instance_name ()
 Get a human readable name for instances associated with this subscription.
 
 get_name (\context $context)
 Get properly formatted name of the rule associated.
 
 get_plugin_name ()
 Get name of the plugin associated with this rule.
 

Protected Attributes

stdClass $subscription
 

Detailed Description

Class represents a single subscription instance (i.e with all the subscription info).

Since
Moodle 2.8
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

tool_monitor\subscription::__construct ( $subscription)

Constructor.

use tool_monitor::subscription_manager::get_subscription to get an instance instead of directly calling this method.

Parameters
stdClass$subscription

Member Function Documentation

◆ __get()

tool_monitor\subscription::__get ( $prop)

Magic get method.

Parameters
string$propproperty to get.
Return values
mixed
Exceptions
coding_exception

◆ __isset()

tool_monitor\subscription::__isset ( $prop)

Magic isset method.

Parameters
string$propthe property to get.
Return values
booltrue if the property is set, false otherwise.

◆ can_manage_rule()

tool_monitor\subscription::can_manage_rule ( )

Can the current user manage the rule associate with this subscription?

Return values
booltrue if the current user can manage this rule, else false.

◆ get_course_name()

tool_monitor\subscription::get_course_name ( \context $context)

Get properly formatted name of the course associated.

Parameters
context$contextcontext where this name would be displayed.
Return values
stringFormatted name of the rule.

◆ get_description()

tool_monitor\subscription::get_description ( \context $context)

Get properly formatted description of the rule associated.

Parameters
context$contextcontext where this description would be displayed.
Return values
stringFormatted description of the rule.

◆ get_event_name()

tool_monitor\subscription::get_event_name ( )

Method to get event name.

Return values
string
Exceptions
coding_exception

◆ get_filters_description()

tool_monitor\subscription::get_filters_description ( )

Get filter description.

Return values
string

◆ get_instance_name()

tool_monitor\subscription::get_instance_name ( )

Get a human readable name for instances associated with this subscription.

Return values
string
Exceptions
coding_exception

◆ get_name()

tool_monitor\subscription::get_name ( \context $context)

Get properly formatted name of the rule associated.

Parameters
context$contextcontext where this name would be displayed.
Return values
stringFormatted name of the rule.

◆ get_plugin_name()

tool_monitor\subscription::get_plugin_name ( )

Get name of the plugin associated with this rule.

Return values
stringPlugin name.

The documentation for this class was generated from the following file: