Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
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.
 
 get_action_name ()
 Returns the action name.
 
 get_text ()
 Returns the action text.
 
 get_type ()
 Returns the type of action.
 
 get_url ()
 Returns the url to the action.
 
 set_type ($type=false)
 Sets the type of the action according to its positiveness.
 

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
 
string string $type = ''
 Store the action type.
 
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: