Removed unused class

This commit is contained in:
Stig Lindqvist 2014-02-24 21:04:44 +13:00
parent ee7feeb130
commit 1057e5823a
1 changed files with 0 additions and 41 deletions

View File

@ -1,41 +0,0 @@
<?php
Class ContentReview extends Object {
/**
* Get the object that have the information about the content
* review settings
*
* Will go through parents and root pages will use the siteconfig
* if their setting is Inherit.
*
* @param SiteTree $page
* @return DataObject or false if no settings found
*/
public function getContentReviewSetting($page) {
if($page->ContentReviewType == 'Custom') {
return $page;
}
if($page->ContentReviewType == 'Disabled') {
return false;
}
// $page is inheriting it's settings from it's parent, find
// the first valid parent with a valid setting
while($parent = $page->Parent()) {
// Root page, use siteconfig
if(!$parent->exists()) {
return SiteConfig::current_site_config();
}
if($parent->ContentReviewType == 'Custom') {
return $parent;
}
if($parent->ContentReviewType == 'Disabled') {
return false;
}
$page = $parent;
}
throw new Exception('This shouldn\'t really happen, as per usual developer logic.');
}
}