You are here

interface AliasManagerInterface in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Path/AliasManagerInterface.php \Drupal\Core\Path\AliasManagerInterface

Find an alias for a path and vice versa.

Hierarchy

Expanded class hierarchy of AliasManagerInterface

All classes that implement AliasManagerInterface

See also

\Drupal\Core\Path\AliasStorageInterface

9 files declare their use of AliasManagerInterface
CustomPageExceptionHtmlSubscriber.php in core/lib/Drupal/Core/EventSubscriber/CustomPageExceptionHtmlSubscriber.php
Contains \Drupal\Core\EventSubscriber\CustomPageExceptionHtmlSubscriber.
MockAliasManager.php in core/modules/system/src/Tests/Routing/MockAliasManager.php
Contains \Drupal\system\Tests\Routing\MockAliasManager.
PathController.php in core/modules/path/src/Controller/PathController.php
Contains \Drupal\path\Controller\PathController.
PathFormBase.php in core/modules/path/src/Form/PathFormBase.php
Contains \Drupal\path\Form\PathFormBase.
PathProcessorAlias.php in core/lib/Drupal/Core/PathProcessor/PathProcessorAlias.php
Contains \Drupal\Core\PathProcessor\PathProcessorAlias.

... See full list

File

core/lib/Drupal/Core/Path/AliasManagerInterface.php, line 15
Contains \Drupal\Core\Path\AliasManagerInterface.

Namespace

Drupal\Core\Path
View source
interface AliasManagerInterface {

  /**
   * Given the alias, return the path it represents.
   *
   * @param string $alias
   *   An alias.
   * @param string $langcode
   *   An optional language code to look up the path in.
   *
   * @return string
   *   The path represented by alias, or the alias if no path was found.
   *
   * @throws \InvalidArgumentException
   *   Thrown when the path does not start with a slash.
   */
  public function getPathByAlias($alias, $langcode = NULL);

  /**
   * Given a path, return the alias.
   *
   * @param string $path
   *   A path.
   * @param string $langcode
   *   An optional language code to look up the path in.
   *
   * @return string
   *   An alias that represents the path, or path if no alias was found.
   *
   * @throws \InvalidArgumentException
   *   Thrown when the path does not start with a slash.
   */
  public function getAliasByPath($path, $langcode = NULL);

  /**
   * Clear internal caches in alias manager.
   *
   * @param $source
   *   Source path of the alias that is being inserted/updated. Can be omitted
   *   if entire cache needs to be flushed.
   */
  public function cacheClear($source = NULL);

}

Members

Namesort descending Modifiers Type Description Overrides
AliasManagerInterface::cacheClear public function Clear internal caches in alias manager. 2
AliasManagerInterface::getAliasByPath public function Given a path, return the alias. 2
AliasManagerInterface::getPathByAlias public function Given the alias, return the path it represents. 2