Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Attributes | List of all members
core_customfield_generator Class Reference
Inheritance diagram for core_customfield_generator:
component_generator_base

Public Member Functions

 add_instance_data (field_controller $field, int $instanceid, $value)
 Adds instance data for one field. More...
 
 create_category ($record=null)
 Create a new category. More...
 
 create_field ($record)
 Create a new field. More...
 
 reset ()
 To be called from data reset code only, do not use in tests. More...
 

Protected Attributes

int $categorycount = 0
 Number of created categories.
 
testing_data_generator $datagenerator
 
int $fieldcount = 0
 Number of created fields.
 

Member Function Documentation

◆ add_instance_data()

core_customfield_generator::add_instance_data ( field_controller  $field,
int  $instanceid,
  $value 
)

Adds instance data for one field.

Parameters
field_controller$field
int$instanceid
mixed$value
Return values
core_customfield

◆ create_category()

core_customfield_generator::create_category (   $record = null)

Create a new category.

Parameters
array | stdClass$record
Return values
category_controller

◆ create_field()

core_customfield_generator::create_field (   $record)

Create a new field.

Parameters
array | stdClass$record
Return values
field_controller

◆ reset()

component_generator_base::reset ( )
inherited

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