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

Breadcrumb

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

function Migration::set

File

core/modules/migrate/src/Plugin/Migration.php, line 584

Class

Migration
Defines the Migration plugin.

Namespace

Drupal\migrate\Plugin

Code

public function set($property_name, $value) {
    if ($property_name == 'source') {
        // Invalidate the source plugin.
        unset($this->sourcePlugin);
    }
    elseif ($property_name === 'destination') {
        // Invalidate the destination plugin.
        unset($this->destinationPlugin);
    }
    elseif ($property_name === 'migration_dependencies') {
        $value = ($value ?: []) + [
            'required' => [],
            'optional' => [],
        ];
    }
    $this->{$property_name} = $value;
    return $this;
}
RSS feed
Powered by Drupal