You are here

static function PartyDefaultDataSet::registerMergeProcesses in Party 7

Register subProcesses for a data set merge.

1 method overrides PartyDefaultDataSet::registerMergeProcesses()
PartyUserDataSet::registerMergeProcesses in modules/party_user/includes/party_user.data.inc
Register subProcesses for a data set merge.

File

includes/party.data.inc, line 191
Provides the default class for managing party - Attached entity relationships.

Class

PartyDefaultDataSet
Class PartyDefaultDataSet

Code

static function registerMergeProcesses($master_controller, $merger_controller) {
  if (!$master_controller
    ->getEntity() || !$merger_controller
    ->getEntity()) {
    return array();
  }
  $entity_type = $master_controller
    ->getDataInfo('entity type');
  $entity_info = entity_get_info($entity_type);
  $mergeClass = $entity_info['merge handler class'];
  $processes = array();
  $processes['merge_entities'] = array(
    'class' => $mergeClass,
    'entityType' => $entity_type,
    'entity1' => $master_controller
      ->getEntity(),
    'entity2' => $merger_controller
      ->getEntity(),
    'targetEntity' => FALSE,
  );
  return $processes;
}