Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
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. More...
 
 get_config ()
 Get the configuration data pertaining to the import. More...
 
 get_id ()
 Get the id of this object.
 
 get_resource ()
 Get the remote resource being imported. More...
 
 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. More...
 

Static Public Member Functions

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

Protected Attributes

stdClass $config
 $config config data pertaining to the import process, e.g. More...
 
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:

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: