src/Reports/PagesWithoutReviewScheduleReport.php
public function sourceRecords($params = [])
    {
        Versioned::set_stage(Versioned::DRAFT);

        $records = SiteTree::get();
        $compatibility = ContentReviewCompatability::start();

        // If there's no review dates set, default to all pages due for review now.

        // Show virtual pages?
        if (empty($params["ShowVirtualPages"])) {
            $virtualPageClasses = ClassInfo::subclassesFor(VirtualPage::class);
            $records = $records->where(sprintf(
                "\"SiteTree\".\"ClassName\" NOT IN ('%s')",
                implode("','", array_values($virtualPageClasses))
            ));
        }

        $records->sort("ParentID");
        $records = $records->toArray();

        // Trim out calculated values
        $list = ArrayList::create();
        foreach ($records as $record) {
            if (!$this->hasReviewSchedule($record)) {
                $list->push($record);
            }
        }

        ContentReviewCompatability::done($compatibility);

        return $list;
    }
public function sourceRecords($params = [])
    {
        Versioned::set_stage(Versioned::DRAFT);

        $records = SiteTree::get();
        $compatibility = ContentReviewCompatability::start();

        // If there's no review dates set, default to all pages due for review now.

        // Show virtual pages?
        if (empty($params["ShowVirtualPages"])) {
            $virtualPageClasses = ClassInfo::subclassesFor(VirtualPage::class);
            $records = $records->where(sprintf(
                "\"SiteTree\".\"ClassName\" NOT IN ('%s')",
                implode("','", array_values($virtualPageClasses))
            ));
        }

        $records->sort("ParentID");
        $records = $records->toArray();

        // Trim out calculated values
        $list = ArrayList::create();
        foreach ($records as $record) {
            if (!$this->hasReviewSchedule($record)) {
                $list->push($record);
            }
        }

        ContentReviewCompatability::done($compatibility);

        return $list;
    }
public function sourceRecords ( $ params = [ ] ) { Versioned :: set_stage ( Versioned :: DRAFT ) ; $ records = SiteTree :: get ( ) ; $ compatibility = ContentReviewCompatability :: start ( ) ; // If there's no review dates set, default to all pages due for review now. // Show virtual pages? if ( empty ( $ params [ "ShowVirtualPages" ] ) ) { $ virtualPageClasses = ClassInfo :: subclassesFor ( VirtualPage :: class ) ; $ records = $ records -> where ( sprintf ( "\"SiteTree\".\"ClassName\" NOT IN ('%s')" , implode ( "','" , array_values ( $ virtualPageClasses ) ) ) ) ; } $ records -> sort ( "ParentID" ) ; $ records = $ records -> toArray ( ) ; // Trim out calculated values $ list = ArrayList :: create ( ) ; foreach ( $ records as $ record ) { if ( ! $ this -> hasReviewSchedule ( $ record ) ) { $ list -> push ( $ record ) ; } } ContentReviewCompatability :: done ( $ compatibility ) ; return $ list ; }
@param array $params

@return SS_List
@param array $params