function party_hat_party_acquisition_post_acquisition in Party 7
Implements hook_party_acquisition_post_acquisition().
Allow callers to indicate special hat related behavior:
- $context['party_hat']['add']: An array of hats that should be added to the party at the end of the acquisition process.
File
- modules/
party_hat/ party_hat.party_acquisition.inc, line 107
Code
function party_hat_party_acquisition_post_acquisition(&$party, &$method, array &$values, array &$context) {
// Check we have a party.
if ($party && !empty($context['party_hat']['add'])) {
// Assign the hats without saving.
party_hat_hats_assign($party, $context['party_hat']['add'], FALSE);
}
}