public function purgeIndexes(IndexRebuildEvent $event)
    {
        if (!$event->getPurge()) {
            return;
        }

        foreach ($this->searchManager->getIndexNames() as $indexName) {
            $event->getOutput()->writeln('<info>Purging index</info>: ' . $indexName);
            $this->searchManager->purge($indexName);
        }
    }
public function purgeIndexes(IndexRebuildEvent $event)
    {
        if (!$event->getPurge()) {
            return;
        }

        foreach ($this->searchManager->getIndexNames() as $indexName) {
            $event->getOutput()->writeln('<info>Purging index</info>: ' . $indexName);
            $this->searchManager->purge($indexName);
        }
    }
public function purgeIndexes ( IndexRebuildEvent $ event ) { if ( ! $ event -> getPurge ( ) ) { return ; } foreach ( $ this -> searchManager -> getIndexNames ( ) as $ indexName ) { $ event -> getOutput ( ) -> writeln ( '<info>Purging index</info>: ' . $ indexName ) ; $ this -> searchManager -> purge ( $ indexName ) ; } }
Purges all indexes, if the purge option is set.

@param IndexRebuildEvent $event
Purges all indexes if the purge option is set .