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 403]

Base class to make it easier to implement actions that are menuable_actions.

Copyright: 2019 Tim Hunt
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 69 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

menu_action_column_base:: (2 methods):
  display_content()
  get_action_menu_link()


Class: menu_action_column_base  - X-Ref

Base class to make it easier to implement actions that are menuable_actions.

Use this class if your action is simple (defined by just a URL, label and icon).
If your action is not simple enough to fit into the pattern that this
class implements, then you will have to implement the menuable_action
interface yourself.

display_content($question, $rowclasses)   X-Ref
Get the information required to display this action either as a menu item or a separate action column.

If this action cannot apply to this question (e.g. because the user does not have
permission, then return [null, null, null].

return: array with three elements.
param: \stdClass $question the row from the $question table, augmented with extra information.

get_action_menu_link(\stdClass $question)   X-Ref
No description