Tiger_Model_PageRedirect
@api· extendsTiger_Model_Table
PageRedirect — slug-change redirects (see migration 0016).
When a published page's slug changes, a row here 301s the old URL to the new one so links and SEO survive. Read by Tiger_Controller_Plugin_PageDispatch on a miss. Tenant-scoped like pages (org cascade: a tenant row wins over global '').
Methods
findFrom()
findFrom($fromSlug, $locale, $orgId = '')
The redirect for a retired slug, or null (tenant row wins over global).
$fromSlugstring— the retired (old) slug$localestring— the locale to match$orgIdstring— tenant scope ('' = global)
Returns Zend_Db_Table_Row_Abstract|null — the redirect row, or null
add()
add($fromSlug, $toSlug, $locale, $orgId = '', $code = 301)
Record a redirect (call on a slug change). Returns the id.
$fromSlugstring— the old slug to redirect from$toSlugstring— the new slug to redirect to$localestring— the locale to match$orgIdstring— tenant scope ('' = global)$codeint— the HTTP redirect status code
Returns string — the page_redirect_id
clearFrom()
clearFrom($fromSlug, $locale, $orgId = '')
Remove any redirect pointing FROM a slug (e.g. a live page reclaims it).
$fromSlugstring— the slug to clear redirects from$localestring— the locale to match$orgIdstring— tenant scope ('' = global)
Returns int — the number of rows deleted