Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core\content\export\exporters\component_exporter Class Reference

A class to help define, describe, and export content in a specific context. More...

Inheritance diagram for core\content\export\exporters\component_exporter:
core\content\export\exporters\abstract_mod_exporter core\content\export\exporters\course_exporter mod_folder\content\exporter mod_page\content\exporter mod_resource\content\exporter

Public Member Functions

 __construct (context $context, string $component, stdClass $user, zipwriter $archive)
 Constructor for a new exporter.
 
 get_archive ()
 Get the archive used for export.
 
 get_component ()
 Get the component name.
 
 get_context ()
 Get the context being exported.
 

Static Public Member Functions

static get_classname_for_component (string $component)
 Get the name of the exporter for the specified component.
 

Protected Attributes

zipwriter $archive
 A reference to the zipwriter.
 
string $component = null
 The component that this instance belongs to.
 
context $context = null
 The context to be exported.
 
stdClass $user
 The user being exported.
 

Detailed Description

A class to help define, describe, and export content in a specific context.

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

Constructor & Destructor Documentation

◆ __construct()

core\content\export\exporters\component_exporter::__construct ( context $context,
string $component,
stdClass $user,
zipwriter $archive )

Constructor for a new exporter.

Parameters
context$contextThe context to export
string$componentThe component that this instance relates to
stdClass$userThe user to be exported
zipwriter$archive

Member Function Documentation

◆ get_archive()

core\content\export\exporters\component_exporter::get_archive ( )

Get the archive used for export.

Return values
zipwriter

◆ get_classname_for_component()

static core\content\export\exporters\component_exporter::get_classname_for_component ( string $component)
static

Get the name of the exporter for the specified component.

Parameters
string$componentThe component to fetch a classname for
Return values
stringThe classname for the component

◆ get_component()

core\content\export\exporters\component_exporter::get_component ( )

Get the component name.

Return values
string

◆ get_context()

core\content\export\exporters\component_exporter::get_context ( )

Get the context being exported.

Return values
context

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