You are here

party.unset_primary.inc in Party 7

Contains merge process for unsetting primary emails.

File

includes/entity_merge/processes/party.unset_primary.inc
View source
<?php

/**
 * @file
 * Contains merge process for unsetting primary emails.
 */
class PartyMergeProcessUnsetEmail extends EntityMergeProcessBase {

  /**
   * Overrides EntityMergeProcessBase::run()
   */
  public function run(&$context = array()) {

    // Unset primary email field ready for merging.
    $ids = array(
      $this->entity1->pid,
      $this->entity2->pid,
    );
    db_update('party')
      ->fields(array(
      'email' => NULL,
    ))
      ->condition('pid', $ids)
      ->execute();
    parent::run($context);
  }

  /**
   * {@inheritdoc}
   */
  public function getProgressMessage(&$context = array()) {
    return t('Removing the secondary party primary email address.');
  }

}

Classes

Namesort descending Description
PartyMergeProcessUnsetEmail @file Contains merge process for unsetting primary emails.