Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
tool_usertours\local\target\base Class Reference

Target base. More...

Inheritance diagram for tool_usertours\local\target\base:
tool_usertours\local\target\block tool_usertours\local\target\selector tool_usertours\local\target\unattached

Public Member Functions

 __construct (step $step)
 Create the target type. More...
 
 convert_to_css ()
 Convert the target value to a valid CSS selector for use in the output configuration. More...
 
 get_displayname ()
 Convert the step target to a friendly name for use in the UI. More...
 
 get_forced_setting_value ($key)
 The value of the forced setting. More...
 
 get_value_from_form ($data)
 Fetch the targetvalue from the form for this target type. More...
 
 is_setting_forced ($key)
 Whether the specified step setting is forced by this target type. More...
 
 prepare_data_for_form ($data)
 Prepare data to submit to the form. More...
 

Static Public Member Functions

static add_config_to_form (\MoodleQuickForm $mform)
 Add the target type configuration to the form. More...
 
static add_disabled_constraints_to_form (\MoodleQuickForm $mform)
 Add the disabledIf values. More...
 

Protected Attributes

step $step
 $step The step being targetted.
 

Static Protected Attributes

static array $forcedsettings = []
 $forcedsettings The settings forced by this type.
 

Detailed Description

Target base.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

tool_usertours\local\target\base::__construct ( step  $step)

Create the target type.

Parameters
step$stepThe step being targetted.

Member Function Documentation

◆ add_config_to_form()

static tool_usertours\local\target\base::add_config_to_form ( \MoodleQuickForm  $mform)
static

Add the target type configuration to the form.

Parameters
MoodleQuickForm$mformThe form to add configuration to.

Reimplemented in tool_usertours\local\target\unattached, tool_usertours\local\target\selector, and tool_usertours\local\target\block.

◆ add_disabled_constraints_to_form()

static tool_usertours\local\target\base::add_disabled_constraints_to_form ( \MoodleQuickForm  $mform)
static

Add the disabledIf values.

Parameters
MoodleQuickForm$mformThe form to add configuration to.

Reimplemented in tool_usertours\local\target\unattached, tool_usertours\local\target\selector, and tool_usertours\local\target\block.

◆ convert_to_css()

tool_usertours\local\target\base::convert_to_css ( )
abstract

Convert the target value to a valid CSS selector for use in the output configuration.

Return values
string

Reimplemented in tool_usertours\local\target\unattached, tool_usertours\local\target\selector, and tool_usertours\local\target\block.

◆ get_displayname()

tool_usertours\local\target\base::get_displayname ( )
abstract

Convert the step target to a friendly name for use in the UI.

Return values
string

Reimplemented in tool_usertours\local\target\unattached, tool_usertours\local\target\selector, and tool_usertours\local\target\block.

◆ get_forced_setting_value()

tool_usertours\local\target\base::get_forced_setting_value (   $key)

The value of the forced setting.

Parameters
string$keyThe name of the key to check.
Return values
mixed

◆ get_value_from_form()

tool_usertours\local\target\base::get_value_from_form (   $data)
abstract

Fetch the targetvalue from the form for this target type.

Parameters
stdClass$dataThe data submitted in the form
Return values
string

Reimplemented in tool_usertours\local\target\unattached, tool_usertours\local\target\selector, and tool_usertours\local\target\block.

◆ is_setting_forced()

tool_usertours\local\target\base::is_setting_forced (   $key)

Whether the specified step setting is forced by this target type.

Parameters
string$keyThe name of the key to check.
Return values
boolean

◆ prepare_data_for_form()

tool_usertours\local\target\base::prepare_data_for_form (   $data)
abstract

Prepare data to submit to the form.

Parameters
object$dataThe data being passed to the form

Reimplemented in tool_usertours\local\target\unattached, tool_usertours\local\target\selector, and tool_usertours\local\target\block.


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