public static function RulesDataUIText::inputForm in Rules 7.2
Implements RulesDataDirectInputFormInterface::inputForm().
Overrides RulesDataDirectInputFormInterface::inputForm
10 calls to RulesDataUIText::inputForm()
- RulesDataUIDate::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- RulesDataUIDecimal::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- RulesDataUIDuration::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- RulesDataUIEntity::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- RulesDataUIInteger::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
10 methods override RulesDataUIText::inputForm()
- RulesDataUIDate::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- RulesDataUIDecimal::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- RulesDataUIDuration::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- RulesDataUIEntity::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
- RulesDataUIInteger::inputForm in ui/
ui.data.inc - Implements RulesDataDirectInputFormInterface::inputForm().
File
- ui/
ui.data.inc, line 203 - Contains data type related forms.
Class
- RulesDataUIText
- UI for textual data.
Code
public static function inputForm($name, $info, $settings, RulesPlugin $element) {
if (!empty($info['options list'])) {
// Make sure the .rules.inc of the providing module is included as the
// options list callback may reside there.
$element
->call('loadBasicInclude');
$form[$name] = array(
'#type' => 'select',
'#options' => call_user_func($info['options list'], $element, $name),
);
}
else {
$form[$name] = array(
'#type' => 'textarea',
'#rows' => 3,
);
RulesDataInputEvaluator::attachForm($form, $settings, $info, $element
->availableVariables());
}
$settings += array(
$name => isset($info['default value']) ? $info['default value'] : NULL,
);
$form[$name] += array(
'#title' => t('Value'),
'#default_value' => $settings[$name],
'#required' => empty($info['optional']),
'#after_build' => array(
'rules_ui_element_fix_empty_after_build',
),
);
return $form;
}