abstract class RulesFormsDataUI in Rules Forms Support 7
Extends data to be used by Rules.
Hierarchy
- class \RulesDataUI
- class \RulesFormsDataUI implements RulesDataDirectInputFormInterface
Expanded class hierarchy of RulesFormsDataUI
File
- includes/
rules_forms.ui.inc, line 11 - Defines data type classes for forms and form elements.
View source
abstract class RulesFormsDataUI extends RulesDataUI implements RulesDataDirectInputFormInterface {
/**
* Provides the default mode.
*/
public static function getDefaultMode() {
return 'input';
}
/**
* Provides the default form.
*/
public static function defaultForm($name, $info, $settings, $title, $type = 'select') {
$form[$name] = array(
'#type' => $type,
'#title' => $title,
'#default_value' => isset($settings[$name]) ? $settings[$name] : NULL,
'#required' => empty($info['optional']),
);
return $form;
}
/**
* Renders a parameter value.
*/
public static function render($value) {
return array(
'content' => array(
'#markup' => check_plain($value),
),
'#attributes' => array(
'class' => array(
'rules-forms-parameter',
),
),
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RulesDataDirectInputFormInterface:: |
public static | function | Constructs the direct input form. | 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. | |
RulesFormsDataUI:: |
public static | function | Provides the default form. | |
RulesFormsDataUI:: |
public static | function |
Provides the default mode. Overrides RulesDataUI:: |
|
RulesFormsDataUI:: |
public static | function |
Renders a parameter value. Overrides RulesDataDirectInputFormInterface:: |