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

Breadcrumb

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

function NodeComplete::prepareRow

Overrides Node::prepareRow

File

core/modules/node/src/Plugin/migrate/source/d7/NodeComplete.php, line 67

Class

NodeComplete
Drupal 7 all node revisions source, including translation revisions.

Namespace

Drupal\node\Plugin\migrate\source\d7

Code

public function prepareRow(Row $row) {
    // Override properties when this is an entity translation revision. The tnid
    // will be set in d7_node source plugin to the value of 'nid'.
    if ($row->getSourceProperty('etr_created')) {
        $row->setSourceProperty('vid', $row->getSourceProperty('revision_id'));
        $row->setSourceProperty('created', $row->getSourceProperty('etr_created'));
        $row->setSourceProperty('timestamp', $row->getSourceProperty('etr_changed'));
        $row->setSourceProperty('revision_uid', $row->getSourceProperty('etr_uid'));
        $row->setSourceProperty('source_langcode', $row->getSourceProperty('source'));
    }
    return parent::prepareRow($row);
}

API Navigation

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