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.

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