3 namespace Drupal\language\Plugin\migrate\source\d6;
5 use Drupal\migrate\Row;
6 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
9 * Drupal multilingual node settings from database.
12 * id = "d6_language_content_settings",
13 * source_module = "locale"
16 class LanguageContentSettings extends DrupalSqlBase {
21 public function query() {
22 return $this->select('node_type', 't')
31 public function fields() {
33 'type' => $this->t('Type'),
34 'language_content_type' => $this->t('Multilingual support.'),
35 'i18n_lock_node' => $this->t('Lock language.'),
43 public function prepareRow(Row $row) {
44 $type = $row->getSourceProperty('type');
45 $row->setSourceProperty('language_content_type', $this->variableGet('language_content_type_' . $type, NULL));
46 $row->setSourceProperty('i18n_lock_node', $this->variableGet('i18n_lock_node_' . $type, 0));
47 return parent::prepareRow($row);
53 public function getIds() {
54 $ids['type']['type'] = 'string';