Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SkipRowIfNotSet.php

function SkipRowIfNotSet::transform

Overrides ProcessPluginBase::transform

File

core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php, line 50

Class

SkipRowIfNotSet
Skips processing the current row when a source value is not set.

Namespace

Drupal\migrate\Plugin\migrate\process

Code

public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
    if (!isset($value[$this->configuration['index']])) {
        $message = !empty($this->configuration['message']) ? $this->configuration['message'] : '';
        throw new MigrateSkipRowException($message);
    }
    return $value[$this->configuration['index']];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal