Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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.

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

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.

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.
return: \stdClass[]|false