You are here

public function Migration::set in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Entity/Migration.php \Drupal\migrate\Entity\Migration::set()

Sets the value of a property.

Parameters

string $property_name: The name of the property that should be set.

mixed $value: The value the property should be set to.

Return value

$this

Overrides ConfigEntityBase::set

File

core/modules/migrate/src/Entity/Migration.php, line 481
Contains \Drupal\migrate\Entity\Migration.

Class

Migration
Defines the Migration entity.

Namespace

Drupal\migrate\Entity

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);
  }
  return parent::set($property_name, $value);
}