Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
mod_bigbluebuttonbn\local\helpers\files Class Reference

Utility class for all files routines helper. More...

Static Public Member Functions

static get_plugin_filename (?stdClass $course, ?stdClass $cm, context $context, array $args)
 Helper for getting pluginfile name.
 
static get_presentation (context $context, string $presentation, $id=null, $withnonce=false)
 Helper return array containing the file descriptor for a preuploaded presentation.
 
static pluginfile_file (?stdClass $course, ?stdClass $cm, context $context, string $filearea, array $args)
 Helper for getting pluginfile.
 
static pluginfile_valid (stdClass $context, string $filearea)
 Helper for validating pluginfile.
 
static save_media_file (stdClass &$bigbluebuttonformdata)
 Get a full path to the file attached as a preuploaded presentation or if there is none, set the presentation field will be set to blank.
 

Static Protected Member Functions

static generate_nonce ($id)
 Generate a nonce and store it in the cache.
 
static get_file_areas ()
 Returns an array of file areas.
 
static get_nonce (int $id)
 Helper generates a salt used for the preuploaded presentation callback url.
 

Detailed Description

Utility class for all files routines helper.

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

Member Function Documentation

◆ generate_nonce()

static mod_bigbluebuttonbn\local\helpers\files::generate_nonce ( $id)
staticprotected

Generate a nonce and store it in the cache.

Parameters
int$id
Return values
int

◆ get_file_areas()

static mod_bigbluebuttonbn\local\helpers\files::get_file_areas ( )
staticprotected

Returns an array of file areas.

Return values
arraya list of available file areas

◆ get_nonce()

static mod_bigbluebuttonbn\local\helpers\files::get_nonce ( int $id)
staticprotected

Helper generates a salt used for the preuploaded presentation callback url.

Parameters
int$id
Return values
int

◆ get_plugin_filename()

static mod_bigbluebuttonbn\local\helpers\files::get_plugin_filename ( ?stdClass $course,
?stdClass $cm,
context $context,
array $args )
static

Helper for getting pluginfile name.

Parameters
stdClass | null$coursecourse object
stdClass | null$cmcourse module object
context$contextcontext object
array$argsextra arguments
Return values
string|null

◆ get_presentation()

static mod_bigbluebuttonbn\local\helpers\files::get_presentation ( context $context,
string $presentation,
$id = null,
$withnonce = false )
static

Helper return array containing the file descriptor for a preuploaded presentation.

Parameters
context$context
string$presentationmatching presentation file name
int$idbigbluebutton instance id
bool$withnonceadd nonce to the url
Return values
array|nullthe representation of the presentation as an associative array

◆ pluginfile_file()

static mod_bigbluebuttonbn\local\helpers\files::pluginfile_file ( ?stdClass $course,
?stdClass $cm,
context $context,
string $filearea,
array $args )
static

Helper for getting pluginfile.

Parameters
stdClass | null$coursecourse object
stdClass | null$cmcourse module object
context$contextcontext object
string$fileareafile area
array$argsextra arguments
Return values
stored_file|bool

◆ pluginfile_valid()

static mod_bigbluebuttonbn\local\helpers\files::pluginfile_valid ( stdClass $context,
string $filearea )
static

Helper for validating pluginfile.

Parameters
stdClass$contextcontext object
string$fileareafile area
Return values
bool|nullfalse if file not valid

◆ save_media_file()

static mod_bigbluebuttonbn\local\helpers\files::save_media_file ( stdClass & $bigbluebuttonformdata)
static

Get a full path to the file attached as a preuploaded presentation or if there is none, set the presentation field will be set to blank.

Parameters
stdClass$bigbluebuttonformdataBigBlueButtonBN form data Note that $bigbluebuttonformdata->presentation is the id of the filearea whereas the bbb instance table stores the file name/path
Return values
string

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