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.

Output helper to export actions for rendering.

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

Defines 1 class

actions_exporter:: (2 methods):
  add_prediction_actions()
  add_bulk_actions()


Class: actions_exporter  - X-Ref

Output helper to export actions for rendering.

add_prediction_actions(\core_analytics\local\target\base $target, \renderer_base $output,\core_analytics\prediction $prediction, bool $includedetailsaction = false)   X-Ref
Add the prediction actions renderable.

return: \stdClass|false
param: \core_analytics\local\target\base $target
param: \renderer_base                    $output
param: \core_analytics\prediction        $prediction
param: bool                              $includedetailsaction

add_bulk_actions(\core_analytics\local\target\base $target, \renderer_base $output, array $predictions,\context $context)   X-Ref
Add bulk actions renderables.

Note that if you are planning to render the bulk actions, the provided predictions must share the same predicted value.

return: \stdClass[]|false
param: \core_analytics\local\target\base $target
param: \renderer_base                    $output
param: \core_analytics\prediction[]      $predictions   Bulk actions for this set of predictions.
param: \context                          $context       The context of these predictions.