l10n_server-2.x-dev/l10n_migrate/src/Plugin/migrate/source/L10nServerTranslationHistory.php
l10n_migrate/src/Plugin/migrate/source/L10nServerTranslationHistory.php
<?php declare(strict_types=1); namespace Drupal\l10n_migrate\Plugin\migrate\source; use Drupal\Core\Database\Query\SelectInterface; use Drupal\migrate\Plugin\migrate\source\SqlBase; /** * Migrate Source plugin. * * @MigrateSource( * id = "l10n_migrate_server_translation_history", * source_module = "l10n_migrate", * ) */ class L10nServerTranslationHistory extends SqlBase { /** * {@inheritdoc} */ public function query(): SelectInterface { return $this ->select('l10n_server_translation_history', 't') ->fields('t', [ 'tid', 'uid_action', 'time_action', 'type_action', 'medium_action', ]); } /** * {@inheritdoc} */ public function fields(): array { return [ 'tid' => $this->t('Translation ID'), 'uid_action' => $this->t('Action User ID'), 'time_action' => $this->t('Action Time'), 'type_action' => $this->t('Action Type'), 'medium_action' => $this->t('Action Medium'), ]; } /** * {@inheritdoc} */ public function getIds(): array { return [ 'tid' => [ 'type' => 'integer', 'alias' => 't', ], 'time_action' => [ 'type' => 'integer', 'alias' => 't', ], 'type_action' => [ 'type' => 'integer', 'alias' => 't', ], ]; } }