Permalink
Browse files

API CHANGE: Replaced DataObjectSet instances with ArrayList.

  • Loading branch information...
1 parent 4ecf908 commit a54963d954d54a3733e5e49c9493cbd4dbe51b0f @ajshort ajshort committed with chillu May 5, 2011
@@ -296,7 +296,7 @@ public function generateTreeStylingJS() {
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 @@ public function getMenu($level = 1) {
}
}
- return new DataObjectSet($visible);
+ return new ArrayList($visible);
}
public function Menu($level) {
@@ -71,7 +71,7 @@ function currentPageID() {
* @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);
}
View
@@ -1618,7 +1618,7 @@ function DependentPages($includeVirtuals = true) {
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 @@ function sourceRecords($params, $sort, $limit) {
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 @@ function FieldHolder() {
function AvailableWidgets() {
- $widgets= new DataObjectSet();
+ $widgets= new ArrayList();
foreach($this->widgetClasses as $widgetClass) {
$classes = ClassInfo::subclassesFor($widgetClass);
@@ -325,7 +325,7 @@ function getOrphanedPages($class = 'SiteTree', $filter = '', $sort = null, $join
$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 @@ function columns() {
);
}
function sourceRecords($params, $sort, $limit) {
- return new DataObjectSet();
+ return new ArrayList();
}
}

0 comments on commit a54963d

Please sign in to comment.