You are here

function hook_party_acquisition_post_acquisition in Party 7

Allow modules to act post acquisition.

Modules can set certain values, log message etc based on acquisitions.

This function should be put in mymodule.party_acquisition.inc and will be automatically include when required.

Parameters

Party|FALSE $party: The party that has been acquired, of FALSE if we failed to acquire.

string $method: The method of acquisition that has occurred. Can be 'create' or' acquire'.

array $values: An array of party fields to match on. Keys are the field and values are the expected values.

array $context: An array of contextual information from the caller and the acquisition class. Values should be checked for their existence before being used.

2 functions implement hook_party_acquisition_post_acquisition()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

party_hat_party_acquisition_post_acquisition in modules/party_hat/party_hat.party_acquisition.inc
Implements hook_party_acquisition_post_acquisition().
party_user_party_acquisition_post_acquisition in modules/party_user/party_user.party_acquisition.inc
Implements hook_party_acquisition_post_acquisition().

File

./party.api.php, line 471
Hooks provided by the Party module.

Code

function hook_party_acquisition_post_acquisition(&$party, &$method, array &$values, array &$context) {

  // Example from party_hat_party_acquisition_post_acquisition().
  // 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);
  }
}