public static function RulesDataUIPartyHatName::inputForm in Party 8.2
Same name and namespace in other branches
- 7 modules/party_hat/party_hat.rules.inc \RulesDataUIPartyHatName::inputForm()
File
- modules/
party_hat/ party_hat.rules.inc, line 127 - Rules integration with party hats.
Class
- RulesDataUIPartyHatName
- Adds a hat chooser form to the enabling action.
Code
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;
}