Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_privacy\local\metadata\collection Class Reference

A collection of metadata items. More...

Public Member Functions

 __construct ($component)
 Constructor for a component's privacy collection class.
 
 add_database_table ($name, array $privacyfields, $summary='')
 Function to add a database table which contains user data to this collection.
 
 add_external_location_link ($name, array $privacyfields, $summary='')
 Function to indicate that data may be exported to an external location.
 
 add_plugintype_link ($name, array $privacyfields=[], $summary='')
 Function to link a plugin to the component.
 
 add_subsystem_link ($name, array $privacyfields=[], $summary='')
 Function to link a subsystem to the component.
 
 add_type (type $type)
 Function to add an object that implements type interface to the current collection.
 
 add_user_preference ($name, $summary='')
 Add a type of user preference to the collection.
 
 get_collection ()
 The content of this collection.
 
 get_component ()
 Function to return the current component name.
 
 link_external_location ($name, array $privacyfields, $summary='')
 Old function to indicate that data may be exported to an external location.
 
 link_plugintype ($name, $summary='')
 Old function to link a plugin to the component.
 
 link_subsystem ($name, $summary='')
 Old function to link a subsystem to the component.
 

Protected Attributes

type[] $collection = []
 The collection of metadata items.
 
string $component
 The component that the items in the collection belong to.
 

Detailed Description

A collection of metadata items.

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

Constructor & Destructor Documentation

◆ __construct()

core_privacy\local\metadata\collection::__construct ( $component)

Constructor for a component's privacy collection class.

Parameters
string$componentcomponent name.

Member Function Documentation

◆ add_database_table()

core_privacy\local\metadata\collection::add_database_table ( $name,
array $privacyfields,
$summary = '' )

Function to add a database table which contains user data to this collection.

Parameters
string$namethe name of the database table.
array$privacyfieldsAn associative array of fieldname to description.
string$summaryA description of what the table is used for.
Return values
$this

◆ add_external_location_link()

core_privacy\local\metadata\collection::add_external_location_link ( $name,
array $privacyfields,
$summary = '' )

Function to indicate that data may be exported to an external location.

Parameters
string$nameA name for the type of data exported.
array$privacyfieldsA list of fields with their description.
string$summaryA description of what the table is used for. This is a language string identifier within the component.
Return values
$this

◆ add_plugintype_link()

core_privacy\local\metadata\collection::add_plugintype_link ( $name,
array $privacyfields = [],
$summary = '' )

Function to link a plugin to the component.

Parameters
string$namethe name of the plugin to link.
array$privacyfieldsAn optional associative array of fieldname to description.
string$summaryA description of what is stored within this plugin.
Return values
$this

◆ add_subsystem_link()

core_privacy\local\metadata\collection::add_subsystem_link ( $name,
array $privacyfields = [],
$summary = '' )

Function to link a subsystem to the component.

Parameters
string$namethe name of the subsystem to link.
array$privacyfieldsAn optional associative array of fieldname to description.
string$summaryA description of what is stored within this subsystem.
Return values
$this

◆ add_type()

core_privacy\local\metadata\collection::add_type ( type $type)

Function to add an object that implements type interface to the current collection.

Parameters
type$typeto add to collection.
Return values
$this

◆ add_user_preference()

core_privacy\local\metadata\collection::add_user_preference ( $name,
$summary = '' )

Add a type of user preference to the collection.

Typically this is a single user preference, but in some cases the name of a user preference fits a particular format.

Parameters
string$nameThe name of the user preference.
string$summaryA description of what the preference is used for.
Return values
$this

◆ get_collection()

core_privacy\local\metadata\collection::get_collection ( )

The content of this collection.

Return values
type[]

◆ get_component()

core_privacy\local\metadata\collection::get_component ( )

Function to return the current component name.

Return values
string

◆ link_external_location()

core_privacy\local\metadata\collection::link_external_location ( $name,
array $privacyfields,
$summary = '' )

Old function to indicate that data may be exported to an external location.

This function is legacy and is not recommended. Please use add_external_location_link() instead.

Parameters
string$nameA name for the type of data exported.
array$privacyfieldsA list of fields with their description.
string$summaryA description of what the table is used for. This is a language string identifier within the component.
Return values
$this

◆ link_plugintype()

core_privacy\local\metadata\collection::link_plugintype ( $name,
$summary = '' )

Old function to link a plugin to the component.

This function is legacy and is not recommended. Please use add_plugintype_link() instead.

Parameters
string$namethe name of the plugin to link.
string$summaryA description of what is stored within this plugin.
Return values
$this

◆ link_subsystem()

core_privacy\local\metadata\collection::link_subsystem ( $name,
$summary = '' )

Old function to link a subsystem to the component.

This function is legacy and is not recommended. Please use add_subsystem_link() instead.

Parameters
string$namethe name of the subsystem to link.
string$summaryA description of what is stored within this subsystem.
Return values
$this

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