Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Files | Namespaces | Classes | Functions | Variables
block_html

Files

file  access.php
 HTML block caps.
 
file  backup_html_block_task.class.php
 @subpackage backup-moodle2
 
file  block_html.php
 Form for editing HTML block instances.
 
file  content.php
 Search area for block_html blocks.
 
file  edit_form.php
 Form for editing HTML block instances.
 
file  lib.php
 Form for editing HTML block instances.
 
file  lib.php
 Provides support for the conversion of moodle1 backup to the moodle2 format.
 
file  provider.php
 Privacy Subsystem implementation for block_html.
 
file  restore_html_block_task.class.php
 @subpackage backup-moodle2
 
file  settings.php
 Settings for the HTML block.
 
file  upgrade.php
 This file keeps track of upgrades to the html block.
 
file  version.php
 Version details.
 

Namespaces

 block_html\privacy
  
 
 block_html\search
  
 

Classes

class  backup_html_block_task
 Specialised backup task for the html block (requires encode_content_links in some configdata attrs) More...
 
class  block_html
 
class  block_html\privacy\provider
 Privacy Subsystem implementation for block_html. More...
 
class  block_html\search\content
 Search area for block_html blocks. More...
 
class  block_html_edit_form
 Form for editing HTML block instances. More...
 
class  moodle1_block_html_handler
 Block conversion handler for html. More...
 
class  restore_html_block_decode_content
 Specialised restore_decode_content provider that unserializes the configdata field, to serve the configdata->text content to the restore_decode_processor packaging it back to its serialized form after process. More...
 
class  restore_html_block_task
 Specialised restore task for the html block (requires encode_content_links in some configdata attrs) More...
 

Functions

 block_html_get_path_from_pluginfile (string $filearea, array $args)
 Given an array with a file path, it returns the itemid and the filepath for the defined filearea. More...
 
 block_html_global_db_replace ($search, $replace)
 Perform global search replace such as when migrating site to new URL. More...
 
 block_html_pluginfile ($course, $birecord_or_cm, $context, $filearea, $args, $forcedownload, array $options=array())
 
 xmldb_block_html_upgrade ($oldversion)
 Upgrade code for the HTML block. More...
 

Variables

 $capabilities
 
$plugin component = 'block_html'
 
$plugin requires = 2019111200
 
$plugin version = 2019111800
 

Detailed Description

Function Documentation

◆ block_html_get_path_from_pluginfile()

block_html_get_path_from_pluginfile ( string  $filearea,
array  $args 
)

Given an array with a file path, it returns the itemid and the filepath for the defined filearea.

Parameters
string$fileareaThe filearea.
array$argsThe path (the part after the filearea and before the filename).
Return values
arrayThe itemid and the filepath inside the $args path, for the defined filearea.

◆ block_html_global_db_replace()

block_html_global_db_replace (   $search,
  $replace 
)

Perform global search replace such as when migrating site to new URL.

Parameters
$search
$replace
Return values
void

◆ xmldb_block_html_upgrade()

xmldb_block_html_upgrade (   $oldversion)

Upgrade code for the HTML block.

Parameters
int$oldversion

Variable Documentation

◆ $capabilities

$capabilities
Initial value:
= array(
'block/html:myaddinstance' => array(
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'user' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/my:manageblocks'
),
'block/html:addinstance' => array(
'riskbitmask' => RISK_SPAM | RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_BLOCK,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/site:manageblocks'
),
)
RISK_SPAM
const RISK_SPAM
Capability allows users to add content others may see - see http://docs.moodle.org/dev/Hardening_new_...
Definition: accesslib.php:147
CONTEXT_SYSTEM
const CONTEXT_SYSTEM
System context level - only one instance in every system.
Definition: accesslib.php:122
CAP_ALLOW
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition: accesslib.php:115
CONTEXT_BLOCK
const CONTEXT_BLOCK
Block context level - one instance for each block, sticky blocks are tricky because ppl think they sh...
Definition: accesslib.php:136
RISK_XSS
const RISK_XSS
Capability allows user to add scripted content - see http://docs.moodle.org/dev/Hardening_new_Roles_s...
Definition: accesslib.php:143