Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Contains the import_strategy_link class.

Copyright: 2020 Jake Dallimore <jrhdallimore@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 71 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

import_strategy_link:: (2 methods):
  get_handlers()
  import()


Class: import_strategy_link  - X-Ref

The import_strategy_link class.

The import_strategy_link objects contains the setup steps needed to prepare a resource for import as a URL into Moodle.

get_handlers(array $registrydata, remote_resource $resource)   X-Ref
Get an array of import_handler_info objects representing modules supporting import of the resource.

param: array $registrydata the fully populated registry.
param: remote_resource $resource the remote resource.
return: import_handler_info[] the array of import_handler_info objects.

import(remote_resource $resource, \stdClass $user, \stdClass $course, int $section)   X-Ref
Import the remote resource according to the rules of this strategy.

param: remote_resource $resource the resource to import.
param: \stdClass $user the user to import on behalf of.
param: \stdClass $course the course into which the remote_resource is being imported.
param: int $section the section into which the remote_resource is being imported.
return: \stdClass the module data.