diff --git a/core/lib/Drupal/Core/Path/Path.php b/core/lib/Drupal/Core/Path/Path.php index 285d189..b025339 100644 --- a/core/lib/Drupal/Core/Path/Path.php +++ b/core/lib/Drupal/Core/Path/Path.php @@ -109,15 +109,7 @@ public function delete($conditions) { } /** - * Preloads path alias information for a given list of source paths. - * - * @param $path - * The path to investigate for corresponding aliases. - * @param $langcode - * Language code to search the path with. If there's no path defined for - * that language it will search paths without language. - * @return array - * Source (keys) to alias (values) mapping. + * {@inheritdoc} */ public function preloadPathAlias($preloaded, $langcode) { $args = array( @@ -148,16 +140,7 @@ public function preloadPathAlias($preloaded, $langcode) { } /** - * Returns an alias of Drupal system URL. - * - * @param string $path - * The path to investigate for corresponding path aliases. - * @param string $langcode - * Language code to search the path with. If there's no path defined for - * that language it will search paths without language. - * - * @return string|bool - * A path alias, or FALSE if no path was found. + * {@inheritdoc} */ public function lookupPathAlias($path, $langcode) { $args = array( @@ -181,16 +164,7 @@ public function lookupPathAlias($path, $langcode) { } /** - * Returns Drupal system URL of an alias. - * - * @param string $path - * The path to investigate for corresponding system URLs. - * @param string $langcode - * Language code to search the path with. If there's no path defined for - * that language it will search paths without language. - * - * @return string|bool - * A Drupal system path, or FALSE if no path was found. + * {@inheritdoc} */ public function lookupPathSource($path, $langcode) { $args = array( diff --git a/core/lib/Drupal/Core/Path/PathInterface.php b/core/lib/Drupal/Core/Path/PathInterface.php index 22c696c..b24329a 100644 --- a/core/lib/Drupal/Core/Path/PathInterface.php +++ b/core/lib/Drupal/Core/Path/PathInterface.php @@ -57,4 +57,45 @@ public function load($conditions); * An array of criteria. */ public function delete($conditions); + + /** + * Preloads path alias information for a given list of source paths. + * + * @param $path + * The path to investigate for corresponding aliases. + * @param $langcode + * Language code to search the path with. If there's no path defined for + * that language it will search paths without language. + * @return array + * Source (keys) to alias (values) mapping. + */ + public function preloadPathAlias($preloaded, $langcode); + + /** + * Returns an alias of Drupal system URL. + * + * @param string $path + * The path to investigate for corresponding path aliases. + * @param string $langcode + * Language code to search the path with. If there's no path defined for + * that language it will search paths without language. + * + * @return string|bool + * A path alias, or FALSE if no path was found. + */ + public function lookupPathAlias($path, $langcode); + + /** + * Returns Drupal system URL of an alias. + * + * @param string $path + * The path to investigate for corresponding system URLs. + * @param string $langcode + * Language code to search the path with. If there's no path defined for + * that language it will search paths without language. + * + * @return string|bool + * A Drupal system path, or FALSE if no path was found. + */ + public function lookupPathSource($path, $langcode); }