protected function Node::handleTranslations in Drupal 10
Same name in this branch
- 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()
Same name and namespace in other branches
- 8 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node::handleTranslations()
- 9 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/ d7/ Node.php
1 method overrides Node::handleTranslations()
- NodeComplete::handleTranslations in core/
modules/ node/ src/ Plugin/ migrate/ source/ d7/ NodeComplete.php - Adapt our query for translations.
File
- core/
modules/ node/ src/ Plugin/ migrate/ source/ d7/ Node.php, line 216
Class
- Node
- Drupal 7 node source from database.
Namespace
Drupal\node\Plugin\migrate\source\d7Code
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]');
}
}