4991dbe2211c26140d46dff8cd74eb04b2192f7e
[yaffs-website] / web / core / modules / tracker / src / Plugin / migrate / source / d7 / TrackerUser.php
1 <?php
2
3 namespace Drupal\tracker\Plugin\migrate\source\d7;
4
5 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
6
7 /**
8  * Drupal 7 tracker user source from database.
9  *
10  * @MigrateSource(
11  *   id = "d7_tracker_user",
12  *   source_module = "tracker"
13  * )
14  */
15 class TrackerUser extends DrupalSqlBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   public function query() {
21     return $this->select('tracker_user', 'tu')->fields('tu');
22   }
23
24   /**
25    * {@inheritdoc}
26    */
27   public function fields() {
28     return [
29       'nid' => $this->t('The {user}.nid this record tracks.'),
30       'uid' => $this->t('The {users}.uid of the node author or commenter.'),
31       'published' => $this->t('Boolean indicating whether the node is published.'),
32       'changed' => $this->t('The Unix timestamp when the user was most recently saved or commented on.'),
33     ];
34   }
35
36   /**
37    * {@inheritdoc}
38    */
39   public function getIds() {
40     $ids['nid']['type'] = 'integer';
41     $ids['uid']['type'] = 'integer';
42     return $ids;
43   }
44
45 }