Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UrlAliasBase.php

function UrlAliasBase::query

Overrides SqlBase::query

File

core/modules/path/src/Plugin/migrate/source/UrlAliasBase.php, line 15

Class

UrlAliasBase
Base class for the url_alias source plugins.

Namespace

Drupal\path\Plugin\migrate\source

Code

public function query() {
    // The order of the migration is significant since
    // \Drupal\path_alias\AliasRepository::lookupPathAlias() orders by pid
    // before returning a result. Postgres does not automatically order by
    // primary key therefore we need to add a specific order by.
    return $this->select('url_alias', 'ua')
        ->fields('ua')
        ->orderBy('pid');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal