Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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.