You are here

public function AliasStorageHelperInterface::loadBySource in Pathauto 8

Fetches an existing URL alias given a path and optional language.

Parameters

string $source: An internal Drupal path.

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

Return value

bool|array FALSE if no alias was found or an associative array containing the following keys:

  • source (string): The internal system path with a starting slash.
  • alias (string): The URL alias with a starting slash.
  • pid (int): Unique path alias identifier.
  • langcode (string): The language code of the alias.
1 method overrides AliasStorageHelperInterface::loadBySource()
AliasStorageHelper::loadBySource in src/AliasStorageHelper.php
Fetches an existing URL alias given a path and optional language.

File

src/AliasStorageHelperInterface.php, line 60

Class

AliasStorageHelperInterface
Provides helper methods for accessing alias storage.

Namespace

Drupal\pathauto

Code

public function loadBySource($source, $language = LanguageInterface::LANGCODE_NOT_SPECIFIED);