Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / src / Plugin / migrate / source / Menu.php
1 <?php
2
3 namespace Drupal\system\Plugin\migrate\source;
4
5 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
6
7 /**
8  * Menu source from database.
9  *
10  * @MigrateSource(
11  *   id = "menu",
12  *   source_module = "menu"
13  * )
14  */
15 class Menu extends DrupalSqlBase {
16
17   /**
18    * {@inheritdoc}
19    */
20   public function query() {
21     return $this->select('menu_custom', 'm')->fields('m');
22   }
23
24   /**
25    * {@inheritdoc}
26    */
27   public function fields() {
28     return [
29       'menu_name' => $this->t('The menu name. Primary key.'),
30       'title' => $this->t('The human-readable name of the menu.'),
31       'description' => $this->t('A description of the menu'),
32     ];
33   }
34
35   /**
36    * {@inheritdoc}
37    */
38   public function getIds() {
39     $ids['menu_name']['type'] = 'string';
40     return $ids;
41   }
42
43 }