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.

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.

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

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.

return: array
param: renderer_base $output