mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
MINOR Renamed Report to SSReport as it was conflicting with project code
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63840 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a0c107a338
commit
ed4103bc11
@ -3,7 +3,7 @@
|
|||||||
* Base "abstract" class for all Report classes
|
* Base "abstract" class for all Report classes
|
||||||
* viewable in the Reports top menu section of CMS.
|
* viewable in the Reports top menu section of CMS.
|
||||||
*/
|
*/
|
||||||
class Report extends ViewableData {
|
class SSReport extends ViewableData {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the title of the report,
|
* This is the title of the report,
|
||||||
|
@ -38,18 +38,18 @@ class ReportAdmin extends LeftAndMain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a DataObjectSet of Report subclasses
|
* Return a DataObjectSet of SSReport subclasses
|
||||||
* that are available for use.
|
* that are available for use.
|
||||||
*
|
*
|
||||||
* @return DataObjectSet
|
* @return DataObjectSet
|
||||||
*/
|
*/
|
||||||
public function Reports() {
|
public function Reports() {
|
||||||
$processedReports = array();
|
$processedReports = array();
|
||||||
$subClasses = ClassInfo::subclassesFor('Report');
|
$subClasses = ClassInfo::subclassesFor('SSReport');
|
||||||
|
|
||||||
if($subClasses) {
|
if($subClasses) {
|
||||||
foreach($subClasses as $subClass) {
|
foreach($subClasses as $subClass) {
|
||||||
if($subClass != 'Report') $processedReports[] = new $subClass();
|
if($subClass != 'SSReport') $processedReports[] = new $subClass();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,11 +103,11 @@ class ReportAdmin extends LeftAndMain {
|
|||||||
public function EditForm() {
|
public function EditForm() {
|
||||||
$ids = array();
|
$ids = array();
|
||||||
$id = isset($_REQUEST['ID']) ? $_REQUEST['ID'] : Session::get('currentPage');
|
$id = isset($_REQUEST['ID']) ? $_REQUEST['ID'] : Session::get('currentPage');
|
||||||
$subClasses = ClassInfo::subclassesFor('Report');
|
$subClasses = ClassInfo::subclassesFor('SSReport');
|
||||||
|
|
||||||
if($subClasses) {
|
if($subClasses) {
|
||||||
foreach($subClasses as $subClass) {
|
foreach($subClasses as $subClass) {
|
||||||
if($subClass != 'Report') {
|
if($subClass != 'SSReport') {
|
||||||
$obj = new $subClass();
|
$obj = new $subClass();
|
||||||
$ids[] = $obj->ID();
|
$ids[] = $obj->ID();
|
||||||
}
|
}
|
||||||
@ -135,7 +135,7 @@ class ReportAdmin extends LeftAndMain {
|
|||||||
$actions = new FieldSet();
|
$actions = new FieldSet();
|
||||||
|
|
||||||
if(is_numeric($id)) $page = DataObject::get_by_id('SiteTree', $id);
|
if(is_numeric($id)) $page = DataObject::get_by_id('SiteTree', $id);
|
||||||
$reportClass = is_object($page) ? 'Report_' . $page->ClassName : $id;
|
$reportClass = is_object($page) ? 'SSReport_' . $page->ClassName : $id;
|
||||||
|
|
||||||
$obj = new $reportClass();
|
$obj = new $reportClass();
|
||||||
if($obj) $fields = $obj->getCMSFields();
|
if($obj) $fields = $obj->getCMSFields();
|
||||||
@ -156,16 +156,16 @@ class ReportAdmin extends LeftAndMain {
|
|||||||
*
|
*
|
||||||
* The test for an existance of a report
|
* The test for an existance of a report
|
||||||
* is done by checking for a subclass of
|
* is done by checking for a subclass of
|
||||||
* "Report" that exists.
|
* "SSReport" that exists.
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public static function has_reports() {
|
public static function has_reports() {
|
||||||
$subClasses = ClassInfo::subclassesFor('Report');
|
$subClasses = ClassInfo::subclassesFor('SSReport');
|
||||||
|
|
||||||
if($subClasses) {
|
if($subClasses) {
|
||||||
foreach($subClasses as $subClass) {
|
foreach($subClasses as $subClass) {
|
||||||
if($subClass != 'Report') {
|
if($subClass != 'SSReport') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user