cc00c0dfa37f3226195192dda57552935648bea1
[yaffs-website] / web / core / modules / migrate / tests / modules / migrate_query_batch_test / src / Plugin / migrate / source / QueryBatchTest.php
1 <?php
2
3 namespace Drupal\migrate_query_batch_test\Plugin\migrate\source;
4
5 use Drupal\migrate\Plugin\migrate\source\SqlBase;
6
7 /**
8  * Source plugin for migration high water tests.
9  *
10  * @MigrateSource(
11  *   id = "query_batch_test"
12  * )
13  */
14 class QueryBatchTest extends SqlBase {
15
16   /**
17    * {@inheritdoc}
18    */
19   public function query() {
20     return ($this->select('query_batch_test', 'q')->fields('q'));
21   }
22
23   /**
24    * {@inheritdoc}
25    */
26   public function fields() {
27     $fields = [
28       'id' => $this->t('Id'),
29       'data' => $this->t('data'),
30     ];
31     return $fields;
32   }
33
34   /**
35    * {@inheritdoc}
36    */
37   public function getIds() {
38     return [
39       'id' => [
40         'type' => 'integer',
41       ],
42     ];
43   }
44
45 }