From 00ca6f92c70c132fcf3be2b95b8bff5f56093788 Mon Sep 17 00:00:00 2001 From: Kristen Pol Date: Tue, 9 Jan 2024 15:23:40 -0800 Subject: [PATCH] Added documentation for canonical redirects. --- src/Seed.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Seed.php b/src/Seed.php index 91888c3a..0d93be9a 100644 --- a/src/Seed.php +++ b/src/Seed.php @@ -402,6 +402,15 @@ public static function unpublishPathAlias($pathAlias) { /** * Handle canonical redirects. * + * Example redirects: + * - en node 123, no alias: /node/123 to /en/node/123. + * - es node 123, no alias: /node/123 to /es/node/123. + * - en node 123, alias: /node/123 and /en/node/123 to en alias. + * - es node 123, alias: /node/123 and /es/node/123 to es alias. + * - en node 123, es translation, no alias: /node/123 to /en/node/123. + * - en node 123, es translation, alias: /node/123 and /en/node/123 to en + * alias, /es/node/123 to es alias. + * * @todo Create simpler logic for when multilingual isn't used? */ public static function handleCanonicalRedirects($entity, $langcode, $url) {