7a3ed8ac531f46cbf39ce7170d8a00a441070a97
[yaffs-website] / web / core / modules / shortcut / src / Plugin / migrate / source / d7 / ShortcutSet.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 source from database.
9  *
10  * @MigrateSource(
11  *   id = "d7_shortcut_set",
12  *   source_module = "shortcut"
13  * )
14  */
15 class ShortcutSet extends DrupalSqlBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   public function query() {
21     return $this->select('shortcut_set', 'ss')->fields('ss');
22   }
23
24   /**
25    * {@inheritdoc}
26    */
27   public function fields() {
28     return [
29       'set_name' => $this->t("The name under which the set's links are stored."),
30       'title' => $this->t("The title of the set."),
31     ];
32   }
33
34   /**
35    * {@inheritdoc}
36    */
37   public function getIds() {
38     $ids['set_name']['type'] = 'string';
39     return $ids;
40   }
41
42 }