A site has many path aliases generated using the Pathauto module, or from the user interface.
I want to get all the aliases the site has. how can I achieve this?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
I got a fresh installed d8.1 and a fresh pathauto 8.1.x-dev. I got the url_alias table in my database by installing the module.
the table schema is [pid | source | alias | langcode]
I guess what you want to do is something like this:
$query = db_select('url_alias', 'ua') ->fields('ua', array('alias')) ->execute();
that should give you the result you want.