X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fconfig_translation%2Fsrc%2FPlugin%2Fmigrate%2Fsource%2Fd6%2FI18nProfileField.php;fp=web%2Fcore%2Fmodules%2Fconfig_translation%2Fsrc%2FPlugin%2Fmigrate%2Fsource%2Fd6%2FI18nProfileField.php;h=c27f1d5674e315d745c0f5918637da8966c3a18d;hp=2989f967b59ec0bbf1826422f20a7c42499bb909;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php b/web/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php index 2989f967b..c27f1d567 100644 --- a/web/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php +++ b/web/core/modules/config_translation/src/Plugin/migrate/source/d6/I18nProfileField.php @@ -2,52 +2,20 @@ namespace Drupal\config_translation\Plugin\migrate\source\d6; -use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase; +@trigger_error('The ' . __NAMESPACE__ . '\I18nProfileField is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use ' . __NAMESPACE__ . '\ProfileFieldTranslation', E_USER_DEPRECATED); /** * i18n strings profile field source from database. * * @MigrateSource( * id = "d6_i18n_profile_field", - * source_provider = "i18n" + * source_module = "i18nprofile" * ) + * + * @deprecated in Drupal 8.4.x and will be removed in Drupal 9.0.x. Use + * \Drupal\config_translation\Plugin\migrate\source\d6\ProfileFieldTranslation + * instead. + * + * @see https://www.drupal.org/node/2898649 */ -class I18nProfileField extends DrupalSqlBase { - - /** - * {@inheritdoc} - */ - public function query() { - $query = $this->select('profile_fields', 'pf') - ->fields('pf', ['fid', 'name']) - ->fields('i18n', ['property']) - ->fields('lt', ['lid', 'translation', 'language']); - $query->leftJoin('i18n_strings', 'i18n', 'i18n.objectid = pf.name'); - $query->leftJoin('locales_target', 'lt', 'lt.lid = i18n.lid'); - return $query; - } - - /** - * {@inheritdoc} - */ - public function fields() { - return [ - 'fid' => $this->t('Profile field ID.'), - 'lid' => $this->t('Locales target language ID.'), - 'language' => $this->t('Language for this field.'), - 'translation' => $this->t('Translation of either the title or explanation.'), - ]; - } - - /** - * {@inheritdoc} - */ - public function getIds() { - $ids['fid']['type'] = 'integer'; - $ids['language']['type'] = 'string'; - $ids['lid']['type'] = 'integer'; - $ids['lid']['alias'] = 'lt'; - return $ids; - } - -} +class I18nProfileField extends ProfileFieldTranslation {}