[ Index ] |
PHP Cross Reference of Unnamed Project |
[Source view] [Print] [Project Stats]
Block generator base class.
Copyright: | 2012 Petr Skoda {@link http://skodak.org} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 141 lines (5 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
reset() X-Ref |
To be called from data reset code only, do not use in tests. return: void |
get_blockname() X-Ref |
Returns block name return: string name of block that this class describes |
prepare_record(stdClass $record) X-Ref |
Fill in record defaults. param: stdClass $record return: stdClass |
create_instance($record = null, $options = array() X-Ref |
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. param: array|stdClass $record forms the basis for the entry to be inserted in the block_instances table. param: array $options further, block-specific options to control how the block is created. return: stdClass the block_instance record that has just been created. |
preprocess_record(stdClass $record, array $options) X-Ref |
Can be overridden to do block-specific processing. $record can be modified in-place. param: stdClass $record the data, before defaults are filled in. param: array $options further, block-specific options, as passed to {@link create_instance()}. |
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |