function EntityTranslationSettings::query

Same name in other branches
  1. 9 core/modules/content_translation/src/Plugin/migrate/source/d7/EntityTranslationSettings.php \Drupal\content_translation\Plugin\migrate\source\d7\EntityTranslationSettings::query()
  2. 8.9.x core/modules/content_translation/src/Plugin/migrate/source/d7/EntityTranslationSettings.php \Drupal\content_translation\Plugin\migrate\source\d7\EntityTranslationSettings::query()
  3. 11.x core/modules/content_translation/src/Plugin/migrate/source/d7/EntityTranslationSettings.php \Drupal\content_translation\Plugin\migrate\source\d7\EntityTranslationSettings::query()

Overrides SqlBase::query

File

core/modules/content_translation/src/Plugin/migrate/source/d7/EntityTranslationSettings.php, line 25

Class

EntityTranslationSettings
Drupal 7 Entity Translation settings (variables) from database.

Namespace

Drupal\content_translation\Plugin\migrate\source\d7

Code

public function query() {
    // Query all meaningful variables for entity translation.
    $query = $this->select('variable', 'v')
        ->fields('v', [
        'name',
        'value',
    ]);
    $condition = $query->orConditionGroup()
        ->condition('name', 'entity_translation_entity_types')
        ->condition('name', 'entity_translation_taxonomy')
        ->condition('name', 'entity_translation_settings_%', 'LIKE')
        ->condition('name', 'language_content_type_%', 'LIKE');
    $query->condition($condition);
    return $query;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.