You are here

public function EntityTranslationSettings::query in Drupal 8

Same name and namespace 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. 10 core/modules/content_translation/src/Plugin/migrate/source/d7/EntityTranslationSettings.php \Drupal\content_translation\Plugin\migrate\source\d7\EntityTranslationSettings::query()

Return value

\Drupal\Core\Database\Query\SelectInterface

Overrides SqlBase::query

File

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

Class

EntityTranslationSettings
Drupal 7 Entity Translation settings from variables.

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