Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
core_external\external_format_value Class Reference

A pre-filled external_value class for text format. More...

Inheritance diagram for core_external\external_format_value:

Public Member Functions

 __construct ($textfieldname, $required=VALUE_REQUIRED, $default=null)
 Constructor.
 

Public Attributes

bool $allownull
 Allow null values.
 
mixed $default
 Default value.
 
string $desc
 Description of element.
 
bool $required
 Element value required, null not allowed.
 
mixed $type
 Value type PARAM_XX.
 

Detailed Description

A pre-filled external_value class for text format.

Default is FORMAT_HTML This should be used all the time in external xxx_params()/xxx_returns functions as it is the standard way to implement text format param/return values.

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

Constructor & Destructor Documentation

◆ __construct()

core_external\external_format_value::__construct ( $textfieldname,
$required = VALUE_REQUIRED,
$default = null )

Constructor.

Parameters
string$textfieldnameName of the text field
int$requiredif VALUE_REQUIRED then set standard default FORMAT_HTML
int$defaultDefault value.

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