3 namespace Drupal\pathauto;
5 use Drupal\Core\Language\LanguageInterface;
8 * Provides an interface for alias uniquifiers.
10 interface AliasUniquifierInterface {
13 * Check to ensure a path alias is unique and add suffix variants if necessary.
15 * Given an alias 'content/test' if a path alias with the exact alias already
16 * exists, the function will change the alias to 'content/test-0' and will
17 * increase the number suffix until it finds a unique alias.
19 * @param string $alias
20 * A string with the alias. Can be altered by reference.
21 * @param string $source
22 * A string with the path source.
23 * @param string $langcode
24 * A string with a language code.
26 public function uniquify(&$alias, $source, $langcode);
29 * Checks if an alias is reserved.
31 * @param string $alias
33 * @param string $source
35 * @param string $langcode
36 * (optional) The language code.
39 * Returns TRUE if the alias is reserved.
41 public function isReserved($alias, $source, $langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED);