You are here

protected function SkipOnValue::compareValue in Migrate Plus 8.3

Same name and namespace in other branches
  1. 8.5 src/Plugin/migrate/process/SkipOnValue.php \Drupal\migrate_plus\Plugin\migrate\process\SkipOnValue::compareValue()
  2. 8.2 src/Plugin/migrate/process/SkipOnValue.php \Drupal\migrate_plus\Plugin\migrate\process\SkipOnValue::compareValue()
  3. 8.4 src/Plugin/migrate/process/SkipOnValue.php \Drupal\migrate_plus\Plugin\migrate\process\SkipOnValue::compareValue()

Compare values to see if they are equal.

Parameters

$value: Actual value

$skipValue: Value to compare against.

$equal: Compare as equal or not equal.

Return value

bool True if the compare successfully, FALSE otherwise.

2 calls to SkipOnValue::compareValue()
SkipOnValue::process in src/Plugin/migrate/process/SkipOnValue.php
SkipOnValue::row in src/Plugin/migrate/process/SkipOnValue.php

File

src/Plugin/migrate/process/SkipOnValue.php, line 78

Class

SkipOnValue
If the source evaluates to a configured value, skip processing or whole row.

Namespace

Drupal\migrate_plus\Plugin\migrate\process

Code

protected function compareValue($value, $skipValue, $equal = TRUE) {
  if ($equal) {
    return (string) $value == (string) $skipValue;
  }
  return (string) $value != (string) $skipValue;
}