Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Contains class for displaying a badgeclass.

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

Defines 1 class

badgeclass_exporter:: (7 methods):
  __construct()
  pick_related()
  map_external_data()
  define_properties()
  define_related()
  define_other_properties()
  get_other_values()


Class: badgeclass_exporter  - X-Ref

Class for displaying a badge competency.

__construct($data, $related = array()   X-Ref
Constructor - saves the persistent object, and the related objects.

param: mixed $data - Either an stdClass or an array of values.
param: array $related - An optional list of pre-loaded objects related to this object.

pick_related()   X-Ref
List properties passed in $data that should be moved to $related in the constructor.

return: array A list of properties to move from $data to $related.

map_external_data($data, $apiversion)   X-Ref
Map data from a request response to the internal structure.

param: stdClass $data The remote data.
param: string $apiversion The backpack version used to communicate remotely.
return: stdClass

define_properties()   X-Ref
Return the list of properties.

return: array

define_related()   X-Ref
Returns a list of objects that are related.

return: array

define_other_properties()   X-Ref
Return the list of additional properties.

return: array

get_other_values(renderer_base $output)   X-Ref
We map from related data passed as data to this exporter to clean exportable values.

param: renderer_base $output
return: array