3 namespace Drupal\shortcut\Plugin\migrate\source\d7;
5 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
8 * Drupal 7 shortcut links source from database.
12 * source_provider = "shortcut"
15 class Shortcut extends DrupalSqlBase {
20 public function query() {
21 return $this->select('menu_links', 'ml')
22 ->fields('ml', ['mlid', 'menu_name', 'link_path', 'link_title', 'weight'])
23 ->condition('hidden', '0')
24 ->condition('menu_name', 'shortcut-set-%', 'LIKE')
31 public function fields() {
33 'mlid' => $this->t("The menu.mlid primary key for this menu item (= shortcut link)."),
34 'menu_name' => $this->t("The menu_name (= set name) for this shortcut link."),
35 'link_path' => $this->t("The link for this shortcut."),
36 'link_title' => $this->t("The title for this shortcut."),
37 'weight' => $this->t("The weight for this shortcut"),
44 public function getIds() {
45 $ids['mlid']['type'] = 'integer';