You are here

function party_hat_rules_assign_hat in Party 7

Same name and namespace in other branches
  1. 8.2 modules/party_hat/party_hat.rules.inc \party_hat_rules_assign_hat()

Implement the assign hat rule.

@todo: Get party loading as a Party object not as stdClass

1 string reference to 'party_hat_rules_assign_hat'
party_hat_rules_action_info in modules/party_hat/party_hat.rules.inc
Provide the action to assign an unassign a hat

File

modules/party_hat/party_hat.rules.inc, line 98
Rules integration with party hats.

Code

function party_hat_rules_assign_hat($party, $hat_name, $settings, $state, $element) {
  $hats = array(
    $hat_name,
  );
  party_hat_hats_assign($party, $hats);
}