function Node::handleTranslations
Same name in this branch
- 11.x core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node::handleTranslations()
Same name in other branches
- 9 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::handleTranslations()
- 9 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node::handleTranslations()
- 8.9.x core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::handleTranslations()
- 8.9.x core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node::handleTranslations()
- 10 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node::handleTranslations()
- 10 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node::handleTranslations()
Adapt our query for translations.
Parameters
\Drupal\Core\Database\Query\SelectInterface $query: The generated query.
1 call to Node::handleTranslations()
- Node::query in core/
modules/ node/ src/ Plugin/ migrate/ source/ d6/ Node.php
1 method overrides Node::handleTranslations()
- NodeRevision::handleTranslations in core/
modules/ node/ src/ Plugin/ migrate/ source/ d6/ NodeRevision.php - Adapt our query for translations.
File
-
core/
modules/ node/ src/ Plugin/ migrate/ source/ d6/ Node.php, line 344
Class
- Node
- Drupal 6 node source from database.
Namespace
Drupal\node\Plugin\migrate\source\d6Code
protected function handleTranslations(SelectInterface $query) {
// Check whether or not we want translations.
if (empty($this->configuration['translations'])) {
// No translations: Yield untranslated nodes, or default translations.
$query->where('[n].[tnid] = 0 OR [n].[tnid] = [n].[nid]');
}
else {
// Translations: Yield only non-default translations.
$query->where('[n].[tnid] <> 0 AND [n].[tnid] <> [n].[nid]');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.