Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_analytics\bulk_action Class Reference

Representation of a suggested bulk action. More...

Inheritance diagram for core_analytics\bulk_action:
core_analytics\action

Public Member Functions

 __construct ($actionname, moodle_url $actionurl, pix_icon $icon, $text, $primary=false, $attributes=array(), $type=false)
 Prediction action constructor.
 
 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 bulk action.

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

Constructor & Destructor Documentation

◆ __construct()

core_analytics\bulk_action::__construct ( $actionname,
moodle_url $actionurl,
pix_icon $icon,
$text,
$primary = false,
$attributes = array(),
$type = false )

Prediction action constructor.

Parameters
string$actionnameThey should match a-zA-Z_0-9-, as we apply a PARAM_ALPHANUMEXT filter
moodle_url$actionurlThe final URL where the user should be forwarded.
pix_icon$iconLink icon
string$textLink text
bool$primaryPrimary button or secondary.
array$attributesLink attributes
string | false$type
Return values
void

Member Function Documentation

◆ get_action_link()

core_analytics\action::get_action_link ( )
inherited

Returns the link to the action.

Return values
renderable

◆ get_action_name()

core_analytics\action::get_action_name ( )
inherited

Returns the action name.

Return values
string

◆ get_text()

core_analytics\action::get_text ( )
inherited

Returns the action text.

Return values
string

◆ get_type()

core_analytics\action::get_type ( )
inherited

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 ( )
inherited

Returns the url to the action.

Return values
moodle_url

◆ set_type()

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

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: