public function Path::load

Fetches a specific URL alias from the database.

Parameters

$conditions: An array of query conditions.

Return value

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

  • source: The internal system path.
  • alias: The URL alias.
  • pid: Unique path alias identifier.
  • langcode: The language code of the alias.
1 call to Path::load()
Path::delete in drupal/core/lib/Drupal/Core/Path/Path.php
Deletes a URL alias.

File

drupal/core/lib/Drupal/Core/Path/Path.php, line 115
Contains Drupal\Core\Path\Path.

Class

Path
Defines a class for CRUD operations on path aliases.

Namespace

Drupal\Core\Path

Code

public function load($conditions) {
  $select = $this->connection
    ->select('url_alias');
  foreach ($conditions as $field => $value) {
    $select
      ->condition($field, $value);
  }
  return $select
    ->fields('url_alias')
    ->execute()
    ->fetchAssoc();
}