Pull merge.
[yaffs-website] / web / core / modules / shortcut / src / Plugin / migrate / source / d7 / ShortcutSetUsers.php
1 <?php
2
3 namespace Drupal\shortcut\Plugin\migrate\source\d7;
4
5 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
6
7 /**
8  * Drupal 7 shortcut_set_users source from database.
9  *
10  * @MigrateSource(
11  *   id = "d7_shortcut_set_users",
12  *   source_module = "shortcut"
13  * )
14  */
15 class ShortcutSetUsers extends DrupalSqlBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   public function query() {
21     return $this->select('shortcut_set_users', 'ssu')->fields('ssu');
22   }
23
24   /**
25    * {@inheritdoc}
26    */
27   public function fields() {
28     return [
29       'uid' => $this->t('The users.uid for this set.'),
30       'set_name' => $this->t('The shortcut_set.set_name that will be displayed for this user.'),
31     ];
32   }
33
34   /**
35    * {@inheritdoc}
36    */
37   public function getIds() {
38     return [
39       'set_name' => [
40         'type' => 'string',
41       ],
42       'uid' => [
43         'type' => 'integer',
44       ],
45     ];
46   }
47
48 }