function Node::getFieldValues

Same name in other branches
  1. 8.9.x core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::getFieldValues()
  2. 10 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::getFieldValues()
  3. 11.x core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::getFieldValues()

Gets field values for a node.

Parameters

\Drupal\migrate\Row $node: The node.

Return value

array Field values, keyed by field name.

1 call to Node::getFieldValues()
Node::prepareRow in core/modules/node/src/Plugin/migrate/source/d6/Node.php
Adds additional data to the row.

File

core/modules/node/src/Plugin/migrate/source/d6/Node.php, line 216

Class

Node
Drupal 6 node source from database.

Namespace

Drupal\node\Plugin\migrate\source\d6

Code

protected function getFieldValues(Row $node) {
    $values = [];
    foreach ($this->getFieldInfo($node->getSourceProperty('type')) as $field => $info) {
        $values[$field] = $this->getFieldData($info, $node);
    }
    return $values;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.