Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

Block target.

Copyright: 2016 Andrew Nicols <andrew@nicols.co.uk>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 126 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: block  - X-Ref

Block target.

convert_to_css()   X-Ref
Convert the target value to a valid CSS selector for use in the
output configuration.

return: string

get_displayname()   X-Ref
Convert the step target to a friendly name for use in the UI.

return: string

get_block_name()   X-Ref
Get the translated name of the block.

return: string

get_frankenstyle($block)   X-Ref
Get the frankenstyle name of the block.

param: string  $block  The block name.
return: The frankenstyle block name.

add_config_to_form(\MoodleQuickForm $mform)   X-Ref
Add the target type configuration to the form.

param: MoodleQuickForm $mform      The form to add configuration to.
return: $this

add_disabled_constraints_to_form(\MoodleQuickForm $mform)   X-Ref
Add the disabledIf values.

param: MoodleQuickForm $mform      The form to add configuration to.

prepare_data_for_form($data)   X-Ref
Prepare data to submit to the form.

param: object          $data       The data being passed to the form

get_value_from_form($data)   X-Ref
Fetch the targetvalue from the form for this target type.

param: stdClass        $data       The data submitted in the form
return: string