Commit 2ccfe553 authored by alexpott's avatar alexpott

Issue #2233607 by visabhishek: Kill path_load() and use...

Issue #2233607 by visabhishek: Kill path_load() and use \Drupal::service('path.alias_storage')->load($conditions) instead.
parent cce2380b
......@@ -96,28 +96,6 @@ function current_path() {
return _current_path();
}
/**
* Fetches a specific URL alias from the database.
*
* @param $conditions
* A string representing the source, a number representing the pid, or an
* array of query conditions.
*
* @see \Drupal\Core\Path\PathInterface::load()
*/
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::service('path.alias_storage')->load($conditions);
}
/**
* Determines whether a path is in the administrative section of the site.
*
......
......@@ -24,7 +24,7 @@ public function adminOverview($keys = NULL) {
* @todo Remove path_admin_edit().
*/
public function adminEdit($path) {
$path = path_load($path);
$path = \Drupal::service('path.alias_storage')->load(array('pid' => $path));
module_load_include('admin.inc', 'path');
return path_admin_edit($path);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment