nglasl\misdirection\LinkMapping
Simple and regular expression link redirection definitions.
@author Nathan Glasl <nathan@symbiote.com.au>
Synopsis
class LinkMapping
extends DataObject
{
- // members
- private static string $table_name = 'LinkMapping';
- private static array $db = ;
- private static array $defaults = ;
- private static string $default_sort = 'ID DESC';
- private static array $searchable_fields = ;
- private static array $summary_fields = ;
- private static array $field_labels = ;
- private static string $priority = 'ASC';
- private $matchedURL;
- // methods
- public void setMatchedURL()
- public void canView()
- public void canEdit()
- public void canCreate()
- public void canDelete()
- public void getTitle()
- public void getCMSFields()
- public void validate()
- public void onBeforeWrite()
- public void getRedirectPage()
- public void getLink()
- public void getLinkHost()
- public void getLinkSummary()
- public void getRedirectTypeSummary()
- public void getRedirectPageTitle()
- public void isLive()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
-
$db
Manually define the redirect page relationship when the CMS module is not present. -
$default_sort
Make sure the link mappings are only ordered by priority and specificity when matching. - $defaults
- $field_labels
-
$matchedURL
Keep track of the initial URL for regular expression pattern replacement. -
$priority
Make sure previous link mappings take precedence. - $searchable_fields
- $summary_fields
- $table_name
Methods
public
- canCreate()
- canDelete()
- canEdit()
- canView()
- getCMSFields()
- getLink() — Retrieve the redirection URL.
- getLinkHost() — Retrieve the redirection hostname.
- getLinkSummary() — Retrieve the redirection URL for display purposes.
- getRedirectPage() — Retrieve the page associated with this link mapping redirection.
- getRedirectPageTitle() — Retrieve the page title associated with this link mapping redirection.
- getRedirectTypeSummary() — Retrieve the redirection type for display purposes.
- getTitle() — Print the mapped URL associated with this link mapping.
- isLive() — Determine if the link mapping is live on the current stage.
- onBeforeWrite() — Unify any URLs that may have been defined.
- setMatchedURL()
- validate()