You are here

function party_hat_rules_unassign_hat in Party 8.2

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

Implement the unassign hat rule.

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

1 string reference to 'party_hat_rules_unassign_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 111
Rules integration with party hats.

Code

function party_hat_rules_unassign_hat($party, $hat_name, $settings, $state, $element) {
  $hats = array(
    $hat_name => party_hat_load($hat_name),
  );
  party_hat_hats_unassign($party, $hats);
}