Fieldtype Bridges
To make your fieldtype compatible with Low Variables, you can choose to return TRUE for the content type low_variables in your accepts_content_type method. You can also use specific methods which are called. As a rule, these methods are named var_x, where x is the original method name.
Note: The var_display_field method must be defined in your fieldtype in order to show up in Low Variables.
Fieldtypes that are called by Low Variables have the following properties available:
Properties
$this->content_type
$this->id
$this->name
$this->row
$this->settings
You can use the following methods in your fieldtype to further enhance Low Variables compatibility.
var_display_field (required)
Displays the input field on the module home page. You can access the current variable id with $this->id. Arguments
Return
var_display_settings
If the fieldtype has settings, use this method to display them. You can access the current variable id with $this->id. Arguments
Return
var_save_settings
(PreviouslyUse this method to catch the settings values before saving them to the database. Arguments
Return
var_post_save_settings
Use this method for additional processing when a (new) variable has been saved to the database. Arguments
Return
var_save
Use this method to catch the variable value before saving it to the database. Arguments
Return
var_post_save
Use this method to do something after the variable value has been saved to the database. Arguments
var_replace_tag
Use this method for displaying the variable value in your templates, using the {exp:low_variables:parse}, {exp:low_variables:single} and {exp:low_variables:pair} tags. Arguments
Return
var_delete
Use this method for additional processing before a variable is deleted. Arguments
Return