l10n_server-2.x-dev/l10n_migrate/src/Plugin/migrate/source/L10nPackagerRelease.php
l10n_migrate/src/Plugin/migrate/source/L10nPackagerRelease.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_packager_release", * source_module = "l10n_migrate", * ) */ class L10nPackagerRelease extends SqlBase { /** * {@inheritdoc} */ public function query(): SelectInterface { return $this ->select('l10n_packager_release', 'r') ->fields( 'r', [ 'rid', 'status', 'checked', 'updated', ] ); } /** * {@inheritdoc} */ public function fields(): array { return [ 'rid' => $this->t('ID'), 'status' => $this->t('Status'), 'checked' => $this->t('Checked'), 'updated' => $this->t('Updated'), ]; } /** * {@inheritdoc} */ public function getIds(): array { return [ 'rid' => [ 'type' => 'integer', 'alias' => 'r', ], ]; } }