public function LanguageContentSettings::prepareRow in Drupal 9
Same name in this branch
- 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()
Same name and namespace in other branches
- 8 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/d7/LanguageContentSettings.php \Drupal\language\Plugin\migrate\source\d7\LanguageContentSettings::prepareRow()
Adds additional data to the row.
Parameters
\Drupal\migrate\Row $row: The row object.
Return value
bool FALSE if this row needs to be skipped.
Overrides SourcePluginBase::prepareRow
File
- core/
modules/ language/ src/ Plugin/ migrate/ source/ d7/ LanguageContentSettings.php, line 47
Class
- LanguageContentSettings
- Drupal 7 i18n 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);
}