class DoubleFiledDataUIDoubleField in Double Field 7.2
UI for double field type parameter.
Hierarchy
- class \RulesDataUI
- class \DoubleFiledDataUIDoubleField implements RulesDataDirectInputFormInterface
Expanded class hierarchy of DoubleFiledDataUIDoubleField
1 string reference to 'DoubleFiledDataUIDoubleField'
- double_field_rules_data_info in ./
double_field.rules.inc - Implements hook_rules_data_info().
File
- ./
double_field.rules.inc, line 43 - Rules integration for the double field module.
View source
class DoubleFiledDataUIDoubleField extends RulesDataUI implements RulesDataDirectInputFormInterface {
/**
* {@inheritdoc}
*/
public static function inputForm($name, $info, $settings, RulesPlugin $element) {
foreach (double_field_rules_property_info() as $subfield => $info) {
$form[$name][$subfield] = array(
'#type' => 'textarea',
'#title' => $info['label'],
'#default_value' => $settings['value'][$subfield],
);
}
return $form;
}
/**
* {@inheritdoc}
*/
public static function render($value) {
return array(
'content' => array(
'#markup' => is_array($value) ? implode(' & ', $value) : $value,
),
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DoubleFiledDataUIDoubleField:: |
public static | function |
Constructs the direct input form. Overrides RulesDataDirectInputFormInterface:: |
|
DoubleFiledDataUIDoubleField:: |
public static | function |
Render the configured value. Overrides RulesDataDirectInputFormInterface:: |
|
RulesDataUI:: |
public static | function | Specifies the default input mode per data type. | 2 |
RulesDataUI:: |
public static | function | Returns the data type and parameter information for the given arguments. | |
RulesDataUI:: |
public static | function | Renders the value with a label if an options list is available. | |
RulesDataUI:: |
public static | function | Provides the selection form for a parameter. |