class RulesDataUIPartyHatName in Party 7
Same name and namespace in other branches
- 8.2 modules/party_hat/party_hat.rules.inc \RulesDataUIPartyHatName
Adds a hat chooser form to the enabling action.
Hierarchy
- class \RulesDataUI
- class \RulesDataUIPartyHatName implements RulesDataDirectInputFormInterface
Expanded class hierarchy of RulesDataUIPartyHatName
1 string reference to 'RulesDataUIPartyHatName'
- party_hat_rules_data_info in modules/
party_hat/ party_hat.rules.inc - Implements hook_rules_data_info() {
File
- modules/
party_hat/ party_hat.rules.inc, line 118 - Rules integration with party hats.
View source
class RulesDataUIPartyHatName extends RulesDataUI implements RulesDataDirectInputFormInterface {
public static function getDefaultMode() {
return 'input';
}
public static function inputForm($name, $info, $settings, RulesPlugin $element) {
// Get a list of all the hats.
$options = party_hat_options_list($name, $info, $settings, $element);
$form[$name] = array(
'#type' => 'select',
'#options' => $options,
'#default_value' => $settings[$name],
'#required' => empty($info['optional']),
);
return $form;
}
public static function render($value) {
return array();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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. | |
RulesDataUIPartyHatName:: |
public static | function |
Specifies the default input mode per data type. Overrides RulesDataUI:: |
|
RulesDataUIPartyHatName:: |
public static | function |
Constructs the direct input form. Overrides RulesDataDirectInputFormInterface:: |
|
RulesDataUIPartyHatName:: |
public static | function |
Render the configured value. Overrides RulesDataDirectInputFormInterface:: |