Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LanguageContentSettings.php

function LanguageContentSettings::prepareRow

Same name in this branch
  1. 11.1.x core/modules/language/src/Plugin/migrate/source/d6/LanguageContentSettings.php \Drupal\language\Plugin\migrate\source\d6\LanguageContentSettings::prepareRow()

Overrides SourcePluginBase::prepareRow

File

core/modules/language/src/Plugin/migrate/source/d7/LanguageContentSettings.php, line 48

Class

LanguageContentSettings
Drupal 7 i18n node settings from database.

Namespace

Drupal\language\Plugin\migrate\source\d7

Code

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);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal