Issue #2233607 by visabhishek: Kill path_load() and use \Drupal::service('path.alias_storage')->load($conditions) instead.

8.0.x
Alex Pott 2014-04-12 22:49:40 -04:00
parent cce2380be1
commit 2ccfe55330
2 changed files with 1 additions and 23 deletions

View File

@ -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.
*

View File

@ -24,7 +24,7 @@ class PathController {
* @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);
}