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.

(no description)

File Size: 210 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: file_node  - X-Ref

Class used to represent a file node in the googledocs repository.

__construct(\stdClass $gdfile)   X-Ref
Constructor.

param: \stdClass $gdfile The Google Drive file object

create_node_array()   X-Ref
Create a repository file array.

This method returns an array which structure is compatible to represent a file node in the repository.

return: array|null The node array or null if the node could not be created

generate_file_title(\stdClass $gdfile)   X-Ref
Generates and returns the title for the file node depending on the type of the Google drive file.

param: \stdClass $gdfile The Google Drive file object
return: string The file title

generate_file_export_format(\stdClass $gdfile)   X-Ref
Generates and returns the file export format depending on the type of the Google drive file.

param: \stdClass $gdfile The Google Drive file object
return: string The file export format

generate_file_link(\stdClass $gdfile)   X-Ref
Generates and returns the external link to the file.

param: \stdClass $gdfile The Google Drive file object
return: string The link to the file