3 namespace Drupal\path\Plugin\migrate\source;
5 use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
8 * Base class for the url_alias source plugins.
10 abstract class UrlAliasBase extends DrupalSqlBase {
15 public function query() {
16 // The order of the migration is significant since
17 // \Drupal\Core\Path\AliasStorage::lookupPathAlias() orders by pid before
18 // returning a result. Postgres does not automatically order by primary key
19 // therefore we need to add a specific order by.
20 return $this->select('url_alias', 'ua')->fields('ua')->orderBy('pid');
26 public function fields() {
28 'pid' => $this->t('The numeric identifier of the path alias.'),
29 'language' => $this->t('The language code of the URL alias.'),
36 public function getIds() {
37 $ids['pid']['type'] = 'integer';