Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
tool_moodlenet\local\import_info Class Reference

Class import_info, describing objects which represent a resource being imported by a user. More...

Public Member Functions

 __construct (int $userid, remote_resource $resource, stdClass $config)
 The import_controller constructor.
 
 get_config ()
 Get the configuration data pertaining to the import.
 
 get_id ()
 Get the id of this object.
 
 get_resource ()
 Get the remote resource being imported.
 
 purge ()
 Remove all information about an import from the store.
 
 save ()
 Save this object to a store which is accessible across requests.
 
 set_config (\stdClass $config)
 Set the configuration data pertaining to the import.
 

Static Public Member Functions

static load (string $id)
 Get an import_info object by id.
 

Protected Attributes

stdClass $config
 $config config data pertaining to the import process, e.g.
 
string $id
 $id string identifier for this object.
 
remote_resource $resource
 $resource the resource being imported.
 
int $userid
 $userid the user conducting this import.
 

Detailed Description

Class import_info, describing objects which represent a resource being imported by a user.

Objects of this class encapsulate both:

  • information about the resource (remote_resource).
  • config data pertaining to the import process, such as the destination course and section and how the resource should be treated (i.e. the type and the name of the module selected as the import handler)
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

tool_moodlenet\local\import_info::__construct ( int $userid,
remote_resource $resource,
stdClass $config )

The import_controller constructor.

Parameters
int$useridthe id of the user performing the import.
remote_resource$resourcethe resource being imported.
stdClass$configimport config like 'course', 'section', 'type'.

Member Function Documentation

◆ get_config()

tool_moodlenet\local\import_info::get_config ( )

Get the configuration data pertaining to the import.

Return values
stdClassthe import configuration data.

◆ get_resource()

tool_moodlenet\local\import_info::get_resource ( )

Get the remote resource being imported.

Return values
remote_resourcethe remote resource being imported.

◆ load()

static tool_moodlenet\local\import_info::load ( string $id)
static

Get an import_info object by id.

Parameters
string$idthe id of the import_info object to load.
Return values
mixedan import_info object if found, otherwise null.

◆ set_config()

tool_moodlenet\local\import_info::set_config ( \stdClass $config)

Set the configuration data pertaining to the import.

Parameters
stdClass$configthe configuration data to set.

Member Data Documentation

◆ $config

stdClass tool_moodlenet\local\import_info::$config
protected

$config config data pertaining to the import process, e.g.

course, section, type.


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