mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
API CHANGE: Replaced DataObjectSet instances with ArrayList.
This commit is contained in:
parent
4ecf908e34
commit
a54963d954
@ -296,7 +296,7 @@ JS;
|
||||
public function PageTypes() {
|
||||
$classes = SiteTree::page_type_classes();
|
||||
|
||||
$result = new DataObjectSet();
|
||||
$result = new ArrayList();
|
||||
|
||||
foreach($classes as $class) {
|
||||
$instance = singleton($class);
|
||||
|
@ -314,7 +314,7 @@ class ContentController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
return new DataObjectSet($visible);
|
||||
return new ArrayList($visible);
|
||||
}
|
||||
|
||||
public function Menu($level) {
|
||||
|
@ -71,7 +71,7 @@ class ReportAdmin extends LeftAndMain {
|
||||
* @return DataObjectSet
|
||||
*/
|
||||
public function Reports() {
|
||||
$output = new DataObjectSet();
|
||||
$output = new ArrayList();
|
||||
foreach(SS_Report::get_reports('ReportAdmin') as $report) {
|
||||
if($report->canView()) $output->push($report);
|
||||
}
|
||||
|
@ -1618,7 +1618,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
if(is_callable('Subsite::disable_subsite_filter')) Subsite::disable_subsite_filter(true);
|
||||
|
||||
// Content links
|
||||
$items = new DataObjectSet();
|
||||
$items = new ArrayList();
|
||||
|
||||
// We merge all into a regular DataObjectSet, because DataList doesn't support merge
|
||||
if($contentLinks = $this->BackLinkTracking()) {
|
||||
|
@ -33,7 +33,7 @@ class BrokenLinksReport extends SS_Report {
|
||||
if (!isset($_REQUEST['CheckSite']) || $params['CheckSite'] == 'Published') $ret = Versioned::get_by_stage('SiteTree', 'Live', "({$q}SiteTree{$q}.{$q}HasBrokenLink{$q} = 1 OR {$q}SiteTree{$q}.{$q}HasBrokenFile{$q} = 1)", $sort, $join, $limit);
|
||||
else $ret = DataObject::get('SiteTree', "({$q}SiteTree{$q}.{$q}HasBrokenFile{$q} = 1 OR {$q}HasBrokenLink{$q} = 1)", $sort, $join, $limit);
|
||||
|
||||
$returnSet = new DataObjectSet();
|
||||
$returnSet = new ArrayList();
|
||||
if ($ret) foreach($ret as $record) {
|
||||
$reason = false;
|
||||
$isRedirectorPage = in_array($record->ClassName, ClassInfo::subclassesFor('RedirectorPage'));
|
||||
|
@ -29,7 +29,7 @@ class WidgetArea extends DataObject {
|
||||
* @return DataObjectSet Collection of {@link Widget_Controller}
|
||||
*/
|
||||
function WidgetControllers() {
|
||||
$controllers = new DataObjectSet();
|
||||
$controllers = new ArrayList();
|
||||
|
||||
foreach($this->ItemsToRender() as $widget) {
|
||||
// find controller
|
||||
|
@ -28,7 +28,7 @@ class WidgetAreaEditor extends FormField {
|
||||
|
||||
function AvailableWidgets() {
|
||||
|
||||
$widgets= new DataObjectSet();
|
||||
$widgets= new ArrayList();
|
||||
|
||||
foreach($this->widgetClasses as $widgetClass) {
|
||||
$classes = ClassInfo::subclassesFor($widgetClass);
|
||||
|
@ -325,7 +325,7 @@ in the other stage:<br />
|
||||
$filter .= ($filter) ? ' AND ' : '';
|
||||
$filter .= sprintf("\"%s\".\"ParentID\" != 0 AND \"Parents\".\"ID\" IS NULL", $class);
|
||||
|
||||
$orphans = new DataObjectSet();
|
||||
$orphans = new ArrayList();
|
||||
foreach(array('Stage', 'Live') as $stage) {
|
||||
$joinByStage = $join;
|
||||
$table = $class;
|
||||
|
@ -22,6 +22,6 @@ class SSReportTest_FakeTest extends SS_Report implements TestOnly {
|
||||
);
|
||||
}
|
||||
function sourceRecords($params, $sort, $limit) {
|
||||
return new DataObjectSet();
|
||||
return new ArrayList();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user