Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Public Member Functions | |
define_default_field () | |
This field just sets up a default field object. More... | |
define_field ($data) | |
Set up the field object according to data in an object. More... | |
object | delete_content ($recordid=0) |
Delete all content associated with the field. More... | |
object | delete_field () |
Delete a field completely. More... | |
display_add_field ($recordid=0, $formdata=null) | |
Print the relevant form element in the ADD template for this field. More... | |
display_browse_field ($recordid, $template) | |
Display the content of the field in browse mode. More... | |
object | display_edit_field () |
Print the relevant form element to define the attributes for this field viewable by teachers only. More... | |
display_search_field ($value='') | |
export_text_value ($record) | |
Per default, return the record's text value only from the "content" field. More... | |
file_ok ($relativepath) | |
format_data_field_checkbox_content ($content) | |
generate_sql ($tablealias, $value) | |
get_config_for_external () | |
Return the plugin configs for external functions. More... | |
get_sort_field () | |
Returns the sortable field for the content. More... | |
get_sort_sql ($fieldname) | |
Returns the SQL needed to refer to the column. More... | |
object | image () |
Prints the respective type icon. More... | |
object | insert_field () |
Insert a new field in the database We assume the field object is already defined as $this->field. More... | |
name () | |
Returns the name/type of the field. More... | |
notemptyfield ($value, $name) | |
Check whether any boxes in the checkbox where checked. More... | |
parse_search_field ($defaults=null) | |
print_after_form () | |
Just in case a field needs to print something after the whole form. More... | |
print_before_form () | |
Just in case a field needs to print something before the whole form. | |
text_export_supported () | |
Per default, it is assumed that fields support text exporting. More... | |
update_content ($recordid, $value, $name='') | |
Update the content of one data field in the data_content table. More... | |
object | update_field () |
Update a field in the database. More... | |
Static Public Member Functions | |
static | get_content_value ($content) |
Returns the presentable string value for a field content. More... | |
static | get_priority () |
Returns the priority for being indexed by globalsearch. More... | |
Static Protected Attributes | |
static int | $priority = self::LOW_PRIORITY |
|
inherited |
This field just sets up a default field object.
bool |
|
inherited |
Set up the field object according to data in an object.
Now is the time to clean it!
bool |
|
inherited |
Delete all content associated with the field.
int | $recordid |
bool |
|
inherited |
Delete a field completely.
bool |
data_field_checkbox::display_add_field | ( | $recordid = 0 , |
|
$formdata = null |
|||
) |
Print the relevant form element in the ADD template for this field.
int | $recordid |
string |
Reimplemented from data_field_base.
data_field_checkbox::display_browse_field | ( | $recordid, | |
$template | |||
) |
Display the content of the field in browse mode.
int | $recordid | |
object | $template |
bool|string |
Reimplemented from data_field_base.
|
inherited |
Print the relevant form element to define the attributes for this field viewable by teachers only.
@global object
void | Output is echo'd |
|
inherited |
Per default, return the record's text value only from the "content" field.
Override this in fields class if necesarry.
string | $record |
string |
Reimplemented in data_field_latlong, and data_field_url.
|
inherited |
string | $relativepath |
bool | false |
Reimplemented in data_field_file, data_field_picture, and data_field_textarea.
data_field_checkbox::get_config_for_external | ( | ) |
Return the plugin configs for external functions.
array | the list of config parameters |
Reimplemented from data_field_base.
|
static |
Returns the presentable string value for a field content.
The returned string should be plain text.
stdClass | $content |
string |
Reimplemented from data_field_base.
|
staticinherited |
Returns the priority for being indexed by globalsearch.
int |
|
inherited |
Returns the sortable field for the content.
By default, it's just content but for some plugins, it could be content 1 - content4
string |
|
inherited |
Returns the SQL needed to refer to the column.
Some fields may need to CAST() etc.
string | $fieldname |
string::$fieldname |
Reimplemented in data_field_date, data_field_latlong, and data_field_number.
|
inherited |
Prints the respective type icon.
string |
|
inherited |
Insert a new field in the database We assume the field object is already defined as $this->field.
bool |
|
inherited |
Returns the name/type of the field.
string |
data_field_checkbox::notemptyfield | ( | $value, | |
$name | |||
) |
Check whether any boxes in the checkbox where checked.
mixed | $value | The submitted values |
mixed | $name |
bool |
Reimplemented from data_field_base.
|
inherited |
Just in case a field needs to print something after the whole form.
Reimplemented in data_field_textarea.
|
inherited |
Per default, it is assumed that fields support text exporting.
Override this (return false) on fields not supporting text exporting.
bool | true |
Reimplemented in data_field_file, and data_field_picture.
data_field_checkbox::update_content | ( | $recordid, | |
$value, | |||
$name = '' |
|||
) |
Update the content of one data field in the data_content table.
int | $recordid | |
mixed | $value | |
string | $name |
bool |
Reimplemented from data_field_base.
|
inherited |