Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 402] [Versions 400 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)