SilverStripe\CMS\Model\SiteTreeExtension
Plug-ins for additional functionality in your SiteTree classes.
Synopsis
class SiteTreeExtension
extends DataExtension
{
- // methods
- public void onBeforePublish()
- public void onAfterPublish()
- public void onBeforeUnpublish()
- public void onAfterUnpublish()
- public boolean|null canAddChildren()
- public boolean|null canPublish()
- public void updateRelativeLink()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Methods
public
- canAddChildren() — Hook called to determine if a user may add children to this SiteTree object
- canPublish() — Hook called to determine if a user may publish this SiteTree object
- onAfterPublish() — Hook called after the page's {@link Versioned::publishSingle()} action is completed
- onAfterUnpublish() — Hook called after the page's {@link SiteTree::doUnpublish()} action is completed
- onBeforePublish() — Hook called before the page's {@link Versioned::publishSingle()} action is completed
- onBeforeUnpublish() — Hook called before the page's {@link Versioned::doUnpublish()} action is completed
- updateRelativeLink() — Hook called to modify the $base url of this page, with a given $action, before {@link SiteTree::RelativeLink()} calls {@link Controller::join_links()} on the $base and $action