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: 120 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

googledocs_content:: (3 methods):
  __construct()
  get_content_nodes()
  get_navigation()


Class: googledocs_content  - X-Ref

Base class for presenting the googledocs repository contents.

__construct(rest $service, string $path, bool $sortcontent = true)   X-Ref
Constructor.

param: rest $service The rest API object
param: string $path The current path
param: bool $sortcontent Whether sorting should be applied to the content

get_content_nodes(string $query, callable $isaccepted)   X-Ref
Generate and return an array containing all repository node (files and folders) arrays for the existing content
based on the path or search query.

param: string $query The search query
param: callable $isaccepted The callback function which determines whether a given file should be displayed
return: array The array containing the repository content node arrays

get_navigation()   X-Ref
Build the navigation (breadcrumb) from a given path.

return: array Array containing name and path of each navigation node