l10n_server-2.x-dev/l10n_migrate/src/Plugin/migrate/source/L10nPackagerFile.php

l10n_migrate/src/Plugin/migrate/source/L10nPackagerFile.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_file",
 *   source_module = "l10n_migrate",
 * )
 */
class L10nPackagerFile extends SqlBase {

  /**
   * {@inheritdoc}
   */
  public function query(): SelectInterface {
    return $this
      ->select('l10n_packager_file', 'f')
      ->fields(
        'f',
        [
          'drid',
          'rid',
          'language',
          'fid',
          'checked',
          'sid_count',
        ]
      );
  }

  /**
   * {@inheritdoc}
   */
  public function fields(): array {
    return [
      'drid' => $this->t('ID'),
      'rid' => $this->t('Release ID'),
      'language' => $this->t('Language'),
      'fid' => $this->t('File ID'),
      'checked' => $this->t('Checked'),
      'sid_count' => $this->t('SID count'),
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function getIds(): array {
    return [
      'drid' => [
        'type' => 'integer',
        'alias' => 'f',
      ],
    ];
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc