private function getIndexableEntities($entity = null)
    {
        if ($entity) {
            return [$entity];
        }

        $entities = [];
        $namespaces = $this->getContainer()->get('solr.doctrine.classnameresolver.known_entity_namespaces');
        $metaInformationFactory = $this->getContainer()->get('solr.meta.information.factory');

        foreach ($namespaces->getEntityClassnames() as $classname) {
            try {
                $metaInformation = $metaInformationFactory->loadInformation($classname);
                if ($metaInformation->isNested()) {
                    continue;
                }

                array_push($entities, $metaInformation->getClassName());
            } catch (SolrMappingException $e) {
                continue;
            }
        }

        return $entities;
    }
private function getIndexableEntities($entity = null)
    {
        if ($entity) {
            return [$entity];
        }

        $entities = [];
        $namespaces = $this->getContainer()->get('solr.doctrine.classnameresolver.known_entity_namespaces');
        $metaInformationFactory = $this->getContainer()->get('solr.meta.information.factory');

        foreach ($namespaces->getEntityClassnames() as $classname) {
            try {
                $metaInformation = $metaInformationFactory->loadInformation($classname);
                if ($metaInformation->isNested()) {
                    continue;
                }

                array_push($entities, $metaInformation->getClassName());
            } catch (SolrMappingException $e) {
                continue;
            }
        }

        return $entities;
    }
private function getIndexableEntities ( $ entity = null ) { if ( $ entity ) { return [ $ entity ] ; } $ entities = [ ] ; $ namespaces = $ this -> getContainer ( ) -> get ( 'solr.doctrine.classnameresolver.known_entity_namespaces' ) ; $ metaInformationFactory = $ this -> getContainer ( ) -> get ( 'solr.meta.information.factory' ) ; foreach ( $ namespaces -> getEntityClassnames ( ) as $ classname ) { try { $ metaInformation = $ metaInformationFactory -> loadInformation ( $ classname ) ; if ( $ metaInformation -> isNested ( ) ) { continue ; } array_push ( $ entities , $ metaInformation -> getClassName ( ) ) ; } catch ( SolrMappingException $ e ) { continue ; } } return $ entities ; }
Get a list of entities which are indexable by Solr

@param null|string $entity

@return array
Get a list of entities which are indexable by Solr