Knp\Bundle\KnpBundlesBundle\Features\Context\SolrContext::bundlesAreIndexed PHP Method

bundlesAreIndexed() public method

public bundlesAreIndexed ( )
    public function bundlesAreIndexed()
    {
        assertTrue($this->isSolrEnabled());
        $bundles = $this->getContainer()->get('doctrine')->getRepository('Knp\\Bundle\\KnpBundlesBundle\\Entity\\Bundle')->findAll();
        $indexer = $this->getContainer()->get('knp_bundles.indexer.solr');
        $indexer->deleteBundlesIndexes();
        foreach ($bundles as $bundle) {
            $indexer->indexBundle($bundle);
        }
    }