Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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