interface AliasUniquifierInterface in Pathauto 8
Provides an interface for alias uniquifiers.
Hierarchy
- interface \Drupal\pathauto\AliasUniquifierInterface
Expanded class hierarchy of AliasUniquifierInterface
All classes that implement AliasUniquifierInterface
File
- src/
AliasUniquifierInterface.php, line 10
Namespace
Drupal\pathautoView source
interface AliasUniquifierInterface {
/**
* Check to ensure a path alias is unique and add suffix variants if necessary.
*
* Given an alias 'content/test' if a path alias with the exact alias already
* exists, the function will change the alias to 'content/test-0' and will
* increase the number suffix until it finds a unique alias.
*
* @param string $alias
* A string with the alias. Can be altered by reference.
* @param string $source
* A string with the path source.
* @param string $langcode
* A string with a language code.
*/
public function uniquify(&$alias, $source, $langcode);
/**
* Checks if an alias is reserved.
*
* @param string $alias
* The alias.
* @param string $source
* The source.
* @param string $langcode
* (optional) The language code.
*
* @return bool
* Returns TRUE if the alias is reserved.
*/
public function isReserved($alias, $source, $langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AliasUniquifierInterface:: |
public | function | Checks if an alias is reserved. | 1 |
AliasUniquifierInterface:: |
public | function | Check to ensure a path alias is unique and add suffix variants if necessary. | 1 |