function MigrationLookup::isValid

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php \Drupal\migrate\Plugin\migrate\process\MigrationLookup::isValid()
  2. 8.9.x core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php \Drupal\migrate\Plugin\migrate\process\MigrationLookup::isValid()
  3. 11.x core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php \Drupal\migrate\Plugin\migrate\process\MigrationLookup::isValid()

Determines if the value is valid for lookup.

The only values considered invalid are: NULL, FALSE, [] and "".

Parameters

string $value: The value to test.

Return value

bool Return true if the value is valid.

File

core/modules/migrate/src/Plugin/migrate/process/MigrationLookup.php, line 318

Class

MigrationLookup
Looks up the value of a property based on a previous migration.

Namespace

Drupal\migrate\Plugin\migrate\process

Code

protected function isValid($value) {
    return !in_array($value, [
        NULL,
        FALSE,
        [],
        "",
    ], TRUE);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.