Return value callback for getAliasByPath() method on the alias manager.
Paramètres
string $path: The path.
Return value
string An alias that represents the path, or path if no alias was found.
Fichier
-
tests/
src/ Unit/ SubPathautoTest.php, line 316
Classe
- SubPathautoTest
- @coversDefaultClass \Drupal\subpathauto\PathProcessor @group subpathauto
Namespace
Drupal\Tests\subpathauto\UnitCode
public function aliasByPathCallback($path) {
$aliases = array_flip($this->aliases);
return $aliases[$path] ?? $path;
}