You are here

protected function MessageTemplateDestination::updateEntity in Message 8

Updates an entity with the contents of a row.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to update.

\Drupal\migrate\Row $row: The row object to update from.

Overrides EntityConfigBase::updateEntity

File

src/Plugin/migrate/destination/MessageTemplateDestination.php, line 19

Class

MessageTemplateDestination
Plugin annotation @MigrateDestination( id = "entity:message_template" )

Namespace

Drupal\message\Plugin\migrate\destination

Code

protected function updateEntity(EntityInterface $entity, Row $row) {
  parent::updateEntity($entity, $row);
  if ($row
    ->getDestinationProperty('text')) {
    $entity
      ->set('text', $row
      ->getDestinationProperty('text'));
  }
}