Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
block_html

Topics

 files
 
 

Directories

directory backup
  
 
directory classes
  
 

Namespaces

namespace  block_html\privacy
 Privacy Subsystem implementation for block_html.
 
namespace  block_html\search
 Search area for block_html blocks.
 

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
 Form for editing HTML block instances. More...
 
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

 xmldb_block_html_upgrade ($oldversion)
 Upgrade code for the HTML block.
 

Variables

 $capabilities
 
 $plugin = 2023100400
 
$plugin component = 'block_html'
 
$plugin version = 2023100900
 

Detailed Description

Function Documentation

◆ 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'
),
)
const CONTEXT_SYSTEM
System context level - only one instance in every system.
Definition accesslib.php:122
const RISK_SPAM
Capability allows users to add content others may see - see
Definition accesslib.php:147
const CAP_ALLOW
Allow permission, overrides CAP_PREVENT defined in parent contexts.
Definition accesslib.php:115
const RISK_XSS
Capability allows user to add scripted content - see
Definition accesslib.php:143
const CONTEXT_BLOCK
Block context level - one instance for each block, sticky blocks are tricky because ppl think they sh...
Definition accesslib.php:136