Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / pathauto / src / AliasUniquifierInterface.php
1 <?php
2
3 namespace Drupal\pathauto;
4
5 use Drupal\Core\Language\LanguageInterface;
6
7 /**
8  * Provides an interface for alias uniquifiers.
9  */
10 interface AliasUniquifierInterface {
11
12   /**
13    * Check to ensure a path alias is unique and add suffix variants if necessary.
14    *
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.
18    *
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.
25    */
26   public function uniquify(&$alias, $source, $langcode);
27
28   /**
29    * Checks if an alias is reserved.
30    *
31    * @param string $alias
32    *   The alias.
33    * @param string $source
34    *   The source.
35    * @param string $langcode
36    *   (optional) The language code.
37    *
38    * @return bool
39    *   Returns TRUE if the alias is reserved.
40    */
41   public function isReserved($alias, $source, $langcode = LanguageInterface::LANGCODE_NOT_SPECIFIED);
42
43 }