private function buildChildNodes(core_kernel_classes_Class $class, $subclasses)
    {
        $children = [];

        // subclasses
        foreach ($subclasses as $subclass) {
            $children[] = $this->classToNode($subclass, $class);
        }
        // resources
        if ($this->showResources) {
            $limit = $this->limit;

            if (in_array($class->getUri(), $this->browsableTypes)) {
                $limit = 0;
            }

            $options = array_merge([
                'limit'     => $limit,
                'offset'    => $this->offset,
                'recursive' => false,
                'order'     => [OntologyRdfs::RDFS_LABEL => 'asc'],
            ], $this->optionsFilter);

            $queryBuilder = $this->getQueryBuilder($class, $this->propertyFilter, $options);
            $search = $this->getSearchService();
            $search->setLanguage($queryBuilder, \common_session_SessionManager::getSession()->getDataLanguage());
            $searchResult = $search->getGateway()->search($queryBuilder);
            foreach ($searchResult as $instance){
                $children[] = TreeHelper::buildResourceNode($instance, $class, $this->extraProperties);
            }
        }
        return $children;
    }
private function buildChildNodes(core_kernel_classes_Class $class, $subclasses)
    {
        $children = [];

        // subclasses
        foreach ($subclasses as $subclass) {
            $children[] = $this->classToNode($subclass, $class);
        }
        // resources
        if ($this->showResources) {
            $limit = $this->limit;

            if (in_array($class->getUri(), $this->browsableTypes)) {
                $limit = 0;
            }

            $options = array_merge([
                'limit'     => $limit,
                'offset'    => $this->offset,
                'recursive' => false,
                'order'     => [OntologyRdfs::RDFS_LABEL => 'asc'],
            ], $this->optionsFilter);

            $queryBuilder = $this->getQueryBuilder($class, $this->propertyFilter, $options);
            $search = $this->getSearchService();
            $search->setLanguage($queryBuilder, \common_session_SessionManager::getSession()->getDataLanguage());
            $searchResult = $search->getGateway()->search($queryBuilder);
            foreach ($searchResult as $instance){
                $children[] = TreeHelper::buildResourceNode($instance, $class, $this->extraProperties);
            }
        }
        return $children;
    }
private function buildChildNodes ( core_kernel_classes_Class $ class , $ subclasses ) { $ children = [ ] ; // subclasses foreach ( $ subclasses as $ subclass ) { $ children [ ] = $ this -> classToNode ( $ subclass , $ class ) ; } // resources if ( $ this -> showResources ) { $ limit = $ this -> limit ; if ( in_array ( $ class -> getUri ( ) , $ this -> browsableTypes ) ) { $ limit = 0 ; } $ options = array_merge ( [ 'limit' => $ limit , 'offset' => $ this -> offset , 'recursive' => false , 'order' => [ OntologyRdfs :: RDFS_LABEL => 'asc' ] , ] , $ this -> optionsFilter ) ; $ queryBuilder = $ this -> getQueryBuilder ( $ class , $ this -> propertyFilter , $ options ) ; $ search = $ this -> getSearchService ( ) ; $ search -> setLanguage ( $ queryBuilder , \ common_session_SessionManager :: getSession ( ) -> getDataLanguage ( ) ) ; $ searchResult = $ search -> getGateway ( ) -> search ( $ queryBuilder ) ; foreach ( $ searchResult as $ instance ) { $ children [ ] = TreeHelper :: buildResourceNode ( $ instance , $ class , $ this -> extraProperties ) ; } } return $ children ; }
Builds the content of a class node including it's content

@param core_kernel_classes_Class $class
@param core_kernel_classes_Class[] $subclasses
@return array
@throws
Builds the content of a class node including it s content