protected function getRecordsInGroup(SolrIndex $indexInstance, $class, $groups, $group)
    {
        // Generate filtered list of local records
        $baseClass = DataObject::getSchema()->baseDataClass($class);
        $items = DataList::create($class)
            ->where(sprintf(
                '"%s"."ID" %% \'%d\' = \'%d\'',
                DataObject::getSchema()->tableName($baseClass),
                intval($groups),
                intval($group)
            ))
            ->sort("ID");

        // Add child filter
        $classes = $indexInstance->getClasses();
        $options = $classes[$class];
        if (!$options['include_children']) {
            $items = $items->filter('ClassName', $class);
        }

        return $items;
    }
protected function getRecordsInGroup(SolrIndex $indexInstance, $class, $groups, $group)
    {
        // Generate filtered list of local records
        $baseClass = DataObject::getSchema()->baseDataClass($class);
        $items = DataList::create($class)
            ->where(sprintf(
                '"%s"."ID" %% \'%d\' = \'%d\'',
                DataObject::getSchema()->tableName($baseClass),
                intval($groups),
                intval($group)
            ))
            ->sort("ID");

        // Add child filter
        $classes = $indexInstance->getClasses();
        $options = $classes[$class];
        if (!$options['include_children']) {
            $items = $items->filter('ClassName', $class);
        }

        return $items;
    }
protected function getRecordsInGroup ( SolrIndex $ indexInstance , $ class , $ groups , $ group ) { // Generate filtered list of local records $ baseClass = DataObject :: getSchema ( ) -> baseDataClass ( $ class ) ; $ items = DataList :: create ( $ class ) -> where ( sprintf ( '"%s"."ID" %% \'%d\' = \'%d\'' , DataObject :: getSchema ( ) -> tableName ( $ baseClass ) , intval ( $ groups ) , intval ( $ group ) ) ) -> sort ( "ID" ) ; // Add child filter $ classes = $ indexInstance -> getClasses ( ) ; $ options = $ classes [ $ class ] ; if ( ! $ options [ 'include_children' ] ) { $ items = $ items -> filter ( 'ClassName' , $ class ) ; } return $ items ; }
Gets the datalist of records in the given group in the current state

Assumes that the desired variant state is in effect.

@param SolrIndex $indexInstance
@param string $class
@param int $groups
@param int $group
@return DataList
Gets the datalist of records in the given group in the current state