◆ create_instance()
testing_block_generator::create_instance |
( |
|
$record = null , |
|
|
|
$options = array() |
|
) |
| |
Create a test block instance.
The $record passed in becomes the basis for the new row added to the block_instances table. You only need to supply the values of interest. Any missing values have sensible defaults filled in.
The $options array provides additional data, not directly related to what will be inserted in the block_instance table, which may affect the block that is created. The meanings of any data passed here depends on the particular type of block being created.
- Parameters
-
array | stdClass | $record | forms the basis for the entry to be inserted in the block_instances table. |
array | $options | further, block-specific options to control how the block is created. |
- Return values
-
stdClass | the block_instance record that has just been created. |
◆ get_blockname()
testing_block_generator::get_blockname |
( |
| ) |
|
Returns block name.
- Return values
-
string | name of block that this class describes |
- Exceptions
-
◆ prepare_record()
testing_block_generator::prepare_record |
( |
stdClass |
$record | ) |
|
|
protected |
Fill in record defaults.
- Parameters
-
- Return values
-
◆ preprocess_record()
testing_block_generator::preprocess_record |
( |
stdClass |
$record, |
|
|
array |
$options |
|
) |
| |
|
protected |
Can be overridden to do block-specific processing.
$record can be modified in-place.
- Parameters
-
stdClass | $record | the data, before defaults are filled in. |
array | $options | further, block-specific options, as passed to create_instance(). |
◆ reset()
testing_block_generator::reset |
( |
| ) |
|
The documentation for this class was generated from the following file: