Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | Protected Attributes | List of all members
core_analytics\action Class Reference

Representation of a suggested action. More...

Inheritance diagram for core_analytics\action:
core_analytics\bulk_action core_analytics\prediction_action

Public Member Functions

 get_action_link ()
 Returns the link to the action. More...
 
 get_action_name ()
 Returns the action name. More...
 
 get_text ()
 Returns the action text. More...
 
 get_type ()
 Returns the type of action. More...
 
 get_url ()
 Returns the url to the action. More...
 
 set_type ($type=false)
 Sets the type of the action according to its positiveness. More...
 

Public Attributes

Action const TYPE_NEGATIVE = 'notuseful'
 type notuseful.
 
Action const TYPE_NEUTRAL = 'neutral'
 type neutral.
 
Action const TYPE_POSITIVE = 'useful'
 type useful.
 

Protected Attributes

renderable $actionlink = null
 
string $actionname = null
 
string $text = null
 
moodle_url $url = null
 

Detailed Description

Representation of a suggested action.

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

Member Function Documentation

◆ get_action_link()

core_analytics\action::get_action_link ( )

Returns the link to the action.

Return values
renderable

◆ get_action_name()

core_analytics\action::get_action_name ( )

Returns the action name.

Return values
string

◆ get_text()

core_analytics\action::get_text ( )

Returns the action text.

Return values
string

◆ get_type()

core_analytics\action::get_type ( )

Returns the type of action.

Return values
stringThe positiveness of the action (self::TYPE_POSITIVE, self::TYPE_NEGATIVE or self::TYPE_NEUTRAL)

◆ get_url()

core_analytics\action::get_url ( )

Returns the url to the action.

Return values
moodle_url

◆ set_type()

core_analytics\action::set_type (   $type = false)

Sets the type of the action according to its positiveness.

Exceptions
coding_exception
Parameters
string | false$typecore_analytics\action::TYPE_POSITIVE, TYPE_NEGATIVE or TYPE_NEUTRAL

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