Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
repository_googledocs\googledocs_content Class Reference

Base class for presenting the googledocs repository contents. More...

Inheritance diagram for repository_googledocs\googledocs_content:

Public Member Functions

 __construct (rest $service, string $path, bool $sortcontent=true)
 Constructor.
 
 get_content_nodes (string $query, callable $isaccepted)
 Generate and return an array containing all repository node (files and folders) arrays for the existing content based on the path or search query.
 
 get_navigation ()
 Build the navigation (breadcrumb) from a given path.
 

Protected Member Functions

 get_contents (string $query)
 Returns all relevant contents (files and folders) based on the given path or search query.
 

Protected Attributes

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

Detailed Description

Base class for presenting the googledocs repository contents.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

repository_googledocs\googledocs_content::__construct ( rest $service,
string $path,
bool $sortcontent = true )

Constructor.

Parameters
rest$serviceThe rest API object
string$pathThe current path
bool$sortcontentWhether sorting should be applied to the content

Member Function Documentation

◆ get_content_nodes()

repository_googledocs\googledocs_content::get_content_nodes ( string $query,
callable $isaccepted )

Generate and return an array containing all repository node (files and folders) arrays for the existing content based on the path or search query.

Parameters
string$queryThe search query
callable$isacceptedThe callback function which determines whether a given file should be displayed or filtered based on the existing file restrictions
Return values
arrayThe array containing the repository content node arrays

◆ get_contents()

repository_googledocs\googledocs_content::get_contents ( string $query)
abstractprotected

Returns all relevant contents (files and folders) based on the given path or search query.

Parameters
string$queryThe search query
Return values
arrayThe array containing the contents

Reimplemented in repository_googledocs\googledocs_content_search, repository_googledocs\local\browser\googledocs_drive_content, repository_googledocs\local\browser\googledocs_root_content, and repository_googledocs\local\browser\googledocs_shared_drives_content.

◆ get_navigation()

repository_googledocs\googledocs_content::get_navigation ( )

Build the navigation (breadcrumb) from a given path.

Return values
arrayArray containing name and path of each navigation node

The documentation for this class was generated from the following file: