function party_hat_get_data_set_rule in Party 8.2
Same name and namespace in other branches
- 7 modules/party_hat/party_hat.module \party_hat_get_data_set_rule()
Get a hat data set rule.
Parameters
$hat: The hat entity.
$data_set_name: The data set name to get the rule for.
Return value
@todo write me.
1 call to party_hat_get_data_set_rule()
- party_hat_form in modules/
party_hat/ party_hat.admin.inc - Entity form for party hats.
File
- modules/
party_hat/ party_hat.module, line 200 - party_hat.module Provides an extensible access system for parties.
Code
function party_hat_get_data_set_rule($hat, $data_set_name) {
if (isset($hat->data['data_sets'][$data_set_name])) {
return $hat->data['data_sets'][$data_set_name];
}
else {
// Return defaults.
// @todo: needed here? These will get saved in the DB next time the hat is
// saved anyway, so should go in the entity constructor rather than here.
return array(
'has' => 0,
'multiple' => 0,
);
}
}