Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

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: 137 lines (3 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)