function path_load

Fetches a specific URL alias from the database.

Parameters

$conditions: A string representing the source, a number representing the pid, or an array of query conditions.

See also

\Drupal\Core\Path\Path::load()

File

drupal/core/includes/path.inc, line 105
Functions to handle paths in Drupal.

Code

function path_load($conditions) {
  if (is_numeric($conditions)) {
    $conditions = array(
      'pid' => $conditions,
    );
  }
  elseif (is_string($conditions)) {
    $conditions = array(
      'source' => $conditions,
    );
  }
  elseif (!is_array($conditions)) {
    return FALSE;
  }
  return drupal_container()
    ->get('path.crud')
    ->load($conditions);
}