Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core_course\local\exporters\course_content_item_exporter Class Reference

The course_content_item_exporter class. More...

Inheritance diagram for core_course\local\exporters\course_content_item_exporter:

Public Member Functions

 __construct (content_item $contentitem, array $related=[])
 The course_content_item_exporter constructor.
 

Protected Member Functions

 get_other_values (\renderer_base $output)
 Get ALL properties for the content_item DTO being exported.
 

Static Protected Member Functions

static define_other_properties ()
 Definition of all properties which are either calculated or originate in a related domain object.
 
static define_properties ()
 Definition of all properties originating in the export target, core_course\local\entity\content_item.
 
static define_related ()
 Define the list of related objects, used by this exporter.
 

Detailed Description

The course_content_item_exporter class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_course\local\exporters\course_content_item_exporter::__construct ( content_item $contentitem,
array $related = [] )

The course_content_item_exporter constructor.

Parameters
content_item$contentitemthe content item to export.
array$relatedthe array of related objects used during export.

Member Function Documentation

◆ define_other_properties()

static core_course\local\exporters\course_content_item_exporter::define_other_properties ( )
staticprotected

Definition of all properties which are either calculated or originate in a related domain object.

Return values
arrayThe array of property values, indexed by name.

◆ define_properties()

static core_course\local\exporters\course_content_item_exporter::define_properties ( )
staticprotected

Definition of all properties originating in the export target, core_course\local\entity\content_item.

Return values
arrayThe array of property values, indexed by name.

◆ define_related()

static core_course\local\exporters\course_content_item_exporter::define_related ( )
staticprotected

Define the list of related objects, used by this exporter.

Return values
arraythe list of related objects.

◆ get_other_values()

core_course\local\exporters\course_content_item_exporter::get_other_values ( \renderer_base $output)
protected

Get ALL properties for the content_item DTO being exported.

These properties are a mix of:

  • readonly properties of the primary object (content_item) being exported.
  • calculated values
  • properties originating from the related domain objects.

Normally, those properties defined in get_properties() are added to the export automatically as part of the superclass code, provided they are public properties on the export target. In this case, the export target is content_item, which doesn't provide public access to its properties, so those are fetched via their respective getters here.

Parameters
renderer_base$output
Return values
arrayThe array of property values, indexed by name.

The documentation for this class was generated from the following file: