You are here

private function RedhenDedupeMergeForm::redhenDedupeBaseFieldMergeable in RedHen CRM 8

Determine if a given property can be merged.

Parameters

array $base_field: A base_field as returned by \Drupal::service('entity_field.manager') ->getBaseFieldDefinitions('redhen_contact', $bundle).

Return value

bool True is mergeable.

1 call to RedhenDedupeMergeForm::redhenDedupeBaseFieldMergeable()
RedhenDedupeMergeForm::buildForm in modules/redhen_dedupe/src/Form/RedhenDedupeMergeForm.php
Form constructor.

File

modules/redhen_dedupe/src/Form/RedhenDedupeMergeForm.php, line 291

Class

RedhenDedupeMergeForm
Form controller for Dedupe merge tool.

Namespace

Drupal\redhen_dedupe\Form

Code

private function redhenDedupeBaseFieldMergeable($base_field) {

  // Don't merge computed fields:
  if ($base_field
    ->isComputed()) {
    return FALSE;
  }

  // Don't merge fields that can't be edited:
  if ($base_field
    ->isReadOnly()) {
    return FALSE;
  }
  return TRUE;
}