class RulesDataUIPartyHatName in Party 8.2
Same name and namespace in other branches
- 7 modules/party_hat/party_hat.rules.inc \RulesDataUIPartyHatName
Adds a hat chooser form to the enabling action.
Hierarchy
- class \RulesDataUIPartyHatName extends \RulesDataUI 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 122 - 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();
$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 |
---|---|---|---|---|
RulesDataUIPartyHatName:: |
public static | function | ||
RulesDataUIPartyHatName:: |
public static | function | ||
RulesDataUIPartyHatName:: |
public static | function |