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

Breadcrumb

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

function AliasManagerInterface::getPathByAlias

Given the alias, return the path it represents.

Parameters

string $alias: An alias.

string $langcode: An optional language code to look up the path in.

Return value

string The path represented by alias, or the alias if no path was found.

Throws

\InvalidArgumentException Thrown when the path does not start with a slash.

File

core/modules/path_alias/src/AliasManagerInterface.php, line 26

Class

AliasManagerInterface
Find an alias for a path and vice versa.

Namespace

Drupal\path_alias

Code

public function getPathByAlias($alias, $langcode = NULL);

API Navigation

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