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

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

Inheritance diagram for external_format_value:
external_value external_description

Public Member Functions

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

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()

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.
Since
Moodle 2.3

Reimplemented from external_description.


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