function LanguageContentSettings::prepareRow
Same name in this branch
- 8.9.x core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php \Drupal\language\Plugin\migrate\source\d6\LanguageContentSettings::prepareRow()
Same name in other branches
- 9 core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php \Drupal\language\Plugin\migrate\source\d6\LanguageContentSettings::prepareRow()
- 9 core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php \Drupal\language\Plugin\migrate\source\d7\LanguageContentSettings::prepareRow()
- 10 core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php \Drupal\language\Plugin\migrate\source\d6\LanguageContentSettings::prepareRow()
- 10 core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php \Drupal\language\Plugin\migrate\source\d7\LanguageContentSettings::prepareRow()
- 11.x core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php \Drupal\language\Plugin\migrate\source\d6\LanguageContentSettings::prepareRow()
- 11.x core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php \Drupal\language\Plugin\migrate\source\d7\LanguageContentSettings::prepareRow()
Overrides SourcePluginBase::prepareRow
File
-
core/
modules/ language/ src/ Plugin/ migrate/ source/ d7/ LanguageContentSettings.php, line 43
Class
- LanguageContentSettings
- Drupal multilingual node settings from database.
Namespace
Drupal\language\Plugin\migrate\source\d7Code
public function prepareRow(Row $row) {
$type = $row->getSourceProperty('type');
$row->setSourceProperty('language_content_type', $this->variableGet('language_content_type_' . $type, NULL));
$i18n_node_options = $this->variableGet('i18n_node_options_' . $type, NULL);
if ($i18n_node_options && in_array('lock', $i18n_node_options)) {
$row->setSourceProperty('i18n_lock_node', 1);
}
else {
$row->setSourceProperty('i18n_lock_node', 0);
}
// Get the entity translation entity settings.
$entity_translation_entity_types = $this->variableGet('entity_translation_entity_types', NULL);
$row->setSourceProperty('entity_translation_entity_types', $entity_translation_entity_types);
return parent::prepareRow($row);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.