Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

Representation of a suggested action.

Copyright: 2019 David Monllao {@link http://www.davidmonllao.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 140 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

action:: (6 methods):
  get_action_name()
  get_url()
  get_action_link()
  get_text()
  set_type()
  get_type()


Class: action  - X-Ref

Representation of a suggested action.

get_action_name()   X-Ref
Returns the action name.

return: string

get_url()   X-Ref
Returns the url to the action.

return: \moodle_url

get_action_link()   X-Ref
Returns the link to the action.

return: \renderable

get_text()   X-Ref
Returns the action text.

return: string

set_type($type = false)   X-Ref
Sets the type of the action according to its positiveness.

param: string|false $type \core_analytics\action::TYPE_POSITIVE, TYPE_NEGATIVE or TYPE_NEUTRAL

get_type()   X-Ref
Returns the type of action.

return: string The positiveness of the action (self::TYPE_POSITIVE, self::TYPE_NEGATIVE or self::TYPE_NEUTRAL)