You are here

function party_log_party_data_set_attach in Party 7

Implements hook_party_data_set_attach().

Store a message against the data set controller when an entity is attached.

File

modules/party_log/party_log.party.inc, line 12
Party General hook include.

Code

function party_log_party_data_set_attach($controller, $entity, $delta, $method, $reattach) {
  global $user;
  $entity_type = $controller
    ->getDataInfo('entity type');
  $data_set_name = $controller
    ->getDataInfo('name');
  $controller->party_log_messages[] = array(
    'message_type' => 'party_data_set_attach_' . $data_set_name,
    $entity_type => $entity,
    'timestamp' => time(),
    'account' => $user,
  );
}