silverstripe-cms/code/model/SiteTreeExtension.php
Sam Minnee bbc3aaaf9f MINOR: Remove training whitespace.
The main benefit of this is so that authors who make use of
.editorconfig don't end up with whitespace changes in their PRs.

Spaces vs. tabs has been left alone, although that could do with a
tidy-up in SS4 after the switch to PSR-1/2.

The command used was this:

for match in '*.ss' '*.css' '*.scss' '*.html' '*.yml' '*.php' '*.js' '*.csv' '*.inc' '*.php5'; do
	find . -path ./thirdparty -prune -o -type f -name "$match" -exec sed -i '' 's/[[:space:]]\+$//' {} \+
	find . -path ./thirdparty -prune -o -type f -name "$match" | xargs perl -pi -e 's/ +$//'
done
2016-01-07 10:32:05 +13:00

79 lines
2.1 KiB
PHP

<?php
/**
* Plug-ins for additional functionality in your SiteTree classes.
*
* @package cms
* @subpackage model
*/
abstract class SiteTreeExtension extends DataExtension {
/**
* Hook called before the page's {@link SiteTree::doPublish()} action is completed
*
* @param SiteTree &$original The current Live SiteTree record prior to publish
*/
public function onBeforePublish(&$original) {
}
/**
* Hook called after the page's {@link SiteTree::doPublish()} action is completed
*
* @param SiteTree &$original The current Live SiteTree record prior to publish
*/
public function onAfterPublish(&$original) {
}
/**
* Hook called before the page's {@link SiteTree::doUnpublish()} action is completed
*/
public function onBeforeUnpublish() {
}
/**
* Hook called after the page's {@link SiteTree::doUnpublish()} action is completed
*/
public function onAfterUnpublish() {
}
/**
* Hook called to determine if a user may add children to this SiteTree object
*
* @see SiteTree::canAddChildren()
*
* @param Member $member The member to check permission against, or the currently
* logged in user
* @return boolean|null Return false to deny rights, or null to yield to default
*/
public function canAddChildren($member) {
}
/**
* Hook called to determine if a user may publish this SiteTree object
*
* @see SiteTree::canPublish()
*
* @param Member $member The member to check permission against, or the currently
* logged in user
* @return boolean|null Return false to deny rights, or null to yield to default
*/
public function canPublish($member) {
}
/**
* 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
*
* @param string &$base The URL of this page relative to siteroot, not including
* the action
* @param string|boolean &$action The action or subpage called on this page.
* (Legacy support) If this is true, then do not reduce the 'home' urlsegment
* to an empty link
*/
public function updateRelativeLink(&$base, &$action) {
}
}