Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | List of all members
cc_helpers Class Reference

Various helper utils. More...

Static Public Member Functions

static add_files (cc_i_manifest &$manifest, $packageroot, $outdir, $allinone=true)
 
static build_query ($attributes, $search)
 
static embedded_files ($html)
 Get list of embedded files. More...
 
static embedded_mapping ($packageroot, $contextid=null)
 
static handle_resource_content (cc_i_manifest &$manifest, $packageroot, $contextid, $outdir, $allinone=true)
 
static handle_static_content (cc_i_manifest &$manifest, $packageroot, $contextid, $outdir, $allinone=true)
 Excerpt from IMS CC 1.1 overview : No spaces in filenames, directory and file references should employ all lowercase or all uppercase - no mixed case. More...
 
static is_html ($filename)
 Checks extension of the supplied filename. More...
 
static process_embedded_files (&$doc, $attributes, $search, $customslash=null)
 
static process_linked_files ($content, cc_i_manifest &$manifest, $packageroot, $contextid, $outdir, $webcontent=false)
 
static randomdir ($where, $prefix='', $suffix='')
 Creates new folder with random name. More...
 
static relative_location ($originpath, $linkingpath)
 
static uuidgen ($prefix='', $suffix='', $uppercase=true)
 Generates unique identifier. More...
 

Detailed Description

Various helper utils.

Author
Darko Miletic dmile.nosp@m.tic@.nosp@m.moodl.nosp@m.eroo.nosp@m.ms.co.nosp@m.m

Member Function Documentation

◆ embedded_files()

static cc_helpers::embedded_files (   $html)
static

Get list of embedded files.

Parameters
string$html
Return values
multitype:mixed

◆ handle_static_content()

static cc_helpers::handle_static_content ( cc_i_manifest $manifest,
  $packageroot,
  $contextid,
  $outdir,
  $allinone = true 
)
static

Excerpt from IMS CC 1.1 overview : No spaces in filenames, directory and file references should employ all lowercase or all uppercase - no mixed case.

Parameters
cc_i_manifest$manifest
string$packageroot
integer$contextid
string$outdir
boolean$allinone
Exceptions
RuntimeException

◆ is_html()

static cc_helpers::is_html (   $filename)
static

Checks extension of the supplied filename.

Parameters
string$filename

◆ randomdir()

static cc_helpers::randomdir (   $where,
  $prefix = '',
  $suffix = '' 
)
static

Creates new folder with random name.

Parameters
string$where
string$prefix
string$suffix
Return values
mixed- directory short name or false in case of failure

◆ uuidgen()

static cc_helpers::uuidgen (   $prefix = '',
  $suffix = '',
  $uppercase = true 
)
static

Generates unique identifier.

Parameters
string$prefix
string$suffix
Return values
string

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