diff --git a/core/includes/path.inc b/core/includes/path.inc index f60292b67f54..60437495e688 100644 --- a/core/includes/path.inc +++ b/core/includes/path.inc @@ -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. * diff --git a/core/modules/path/lib/Drupal/path/Controller/PathController.php b/core/modules/path/lib/Drupal/path/Controller/PathController.php index a8fae4afffd1..ebb2c1d6dccd 100644 --- a/core/modules/path/lib/Drupal/path/Controller/PathController.php +++ b/core/modules/path/lib/Drupal/path/Controller/PathController.php @@ -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); }