Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Files | Namespaces | Classes | Functions | Variables
core_repository

Files

file  lib.php
 This file contains classes used to manage the repository plugins in Moodle.
 
file  provider.php
 Privacy Subsystem implementation for core_repository.
 

Namespaces

namespace  core_repository\privacy
  
 

Classes

class  core_repository\privacy\provider
 Privacy Subsystem for core_repository implementing metadata and plugin providers. More...
 
class  repository
 This is the base class of the repository class. More...
 
class  repository_exception
 Exception class for repository api. More...
 
class  repository_instance_form
 This is a class used to define a repository instance form. More...
 
class  repository_type
 This class is used to manage repository plugins. More...
 
class  repository_type_form
 This is a class used to define a repository type setting form. More...
 

Functions

 initialise_filepicker ($args)
 Generate all options needed by filepicker. More...
 
 repository_delete_selected_files ($context, string $component, string $filearea, $itemid, array $files)
 Convenience function to handle deletion of files. More...
 
 repository_download_selected_files ($context, string $component, string $filearea, $itemid, array $files)
 Convenience function to handle deletion of files. More...
 

Variables

const FILE_CONTROLLED_LINK 8
 
const FILE_EXTERNAL 1
 
const FILE_INTERNAL 2
 
const FILE_REFERENCE 4
 
const RENAME_SUFFIX '_2'
 

Detailed Description

Function Documentation

◆ initialise_filepicker()

initialise_filepicker (   $args)

Generate all options needed by filepicker.

Parameters
array$argsincluding following keys context accepted_types return_types
Return values
arraythe list of repository instances, including meta infomation, containing the following keys externallink repositories accepted_types

◆ repository_delete_selected_files()

repository_delete_selected_files (   $context,
string  $component,
string  $filearea,
  $itemid,
array  $files 
)

Convenience function to handle deletion of files.

Parameters
object$contextThe context where the delete is called
string$componentcomponent
string$fileareafilearea
int$itemidthe item id
array$filesArray of files object with each item having filename/filepath as values
Return values
array::$returnArray of strings matching up to the parent directory of the deleted files
Exceptions
coding_exception

◆ repository_download_selected_files()

repository_download_selected_files (   $context,
string  $component,
string  $filearea,
  $itemid,
array  $files 
)

Convenience function to handle deletion of files.

Parameters
object$contextThe context where the delete is called
string$componentcomponent
string$fileareafilearea
int$itemidthe item id
array$filesArray of files object with each item having filename/filepath as values
Return values
array::$returnArray of strings matching up to the parent directory of the deleted files
Exceptions
coding_exception