Skip to content

Commit

Permalink
Added documentation for canonical redirects.
Browse files Browse the repository at this point in the history
  • Loading branch information
kepol committed Jan 9, 2024
1 parent 641735f commit 00ca6f9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Seed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 00ca6f9

Please sign in to comment.