API Add a missing alternatePreviewLink hook for SiteTree extensions.

This commit is contained in:
Mateusz Uzdowski 2013-05-17 14:57:17 +12:00
parent 2567cda0b4
commit bccd2f8e51

View File

@ -446,8 +446,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
* @return string
*/
public function PreviewLink($action = null) {
if($this->hasMethod('alternatePreviewLink')) {
return $this->alternatePreviewLink($action);
} else {
return $this->AbsoluteLink($action);
}
}
/**
* Return the link for this {@link SiteTree} object relative to the SilverStripe root.