3 namespace Drupal\pathauto;
4 use Drupal\Core\Language\LanguageInterface;
7 * Provides an interface for alias uniquifiers.
9 interface AliasUniquifierInterface {
12 * Check to ensure a path alias is unique and add suffix variants if necessary.
14 * Given an alias 'content/test' if a path alias with the exact alias already
15 * exists, the function will change the alias to 'content/test-0' and will
16 * increase the number suffix until it finds a unique alias.
18 * @param string $alias
19 * A string with the alias. Can be altered by reference.
20 * @param string $source
21 * A string with the path source.
22 * @param string $langcode
23 * A string with a language code.
25 public function uniquify(&$alias, $source, $langcode);
28 * Checks if an alias is reserved.
30 * @param string $alias
32 * @param string $source
34 * @param string $langcode
35 * (optional) The language code.
38 * Returns TRUE if the alias is reserved.
40 public function isReserved($alias, $source, $langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED);