interface AliasManagerInterface in Drupal 8
Same name in this branch
- 8 core/modules/path_alias/src/AliasManagerInterface.php \Drupal\path_alias\AliasManagerInterface
- 8 core/lib/Drupal/Core/Path/AliasManagerInterface.php \Drupal\Core\Path\AliasManagerInterface
Find an alias for a path and vice versa.
Hierarchy
- interface \Drupal\Core\Path\AliasManagerInterface
Expanded class hierarchy of AliasManagerInterface
All classes that implement AliasManagerInterface
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\path_alias\AliasManagerInterface.
See also
https://www.drupal.org/node/3092086
9 files declare their use of AliasManagerInterface
- AliasManagerDecorator.php in core/
modules/ path_alias/ tests/ modules/ path_alias_deprecated_test/ src/ AliasManagerDecorator.php - AliasManagerInterface.php in core/
modules/ path_alias/ src/ AliasManagerInterface.php - DeprecatedClassesTest.php in core/
modules/ path_alias/ tests/ src/ Unit/ DeprecatedClassesTest.php - NewAliasManager.php in core/
modules/ path_alias/ tests/ modules/ path_alias_deprecated_test/ src/ NewAliasManager.php - PathProcessorAlias.php in core/
lib/ Drupal/ Core/ PathProcessor/ PathProcessorAlias.php
File
- core/
lib/ Drupal/ Core/ Path/ AliasManagerInterface.php, line 13
Namespace
Drupal\Core\PathView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AliasManagerInterface:: |
public | function | Clear internal caches in alias manager. | 4 |
AliasManagerInterface:: |
public | function | Given a path, return the alias. | 4 |
AliasManagerInterface:: |
public | function | Given the alias, return the path it represents. | 4 |