public function doIndexingRunAction()
    {
        /** @var $indexService \ApacheSolrForTypo3\Solr\Domain\Index\IndexService */
        $indexService = GeneralUtility::makeInstance(IndexService::class, /** @scrutinizer ignore-type */ $this->selectedSite);
        $indexWithoutErrors = $indexService->indexItems(10);

        $label = 'solr.backend.index_queue_module.flashmessage.success.index_manual';
        $severity = FlashMessage::OK;
        if (!$indexWithoutErrors) {
            $label = 'solr.backend.index_queue_module.flashmessage.error.index_manual';
            $severity = FlashMessage::ERROR;
        }

        $this->addFlashMessage(
            LocalizationUtility::translate($label, 'Solr'),
            LocalizationUtility::translate('solr.backend.index_queue_module.flashmessage.index_manual', 'Solr'),
            $severity
        );

        $this->redirect('index');
    }
public function doIndexingRunAction()
    {
        /** @var $indexService \ApacheSolrForTypo3\Solr\Domain\Index\IndexService */
        $indexService = GeneralUtility::makeInstance(IndexService::class, /** @scrutinizer ignore-type */ $this->selectedSite);
        $indexWithoutErrors = $indexService->indexItems(10);

        $label = 'solr.backend.index_queue_module.flashmessage.success.index_manual';
        $severity = FlashMessage::OK;
        if (!$indexWithoutErrors) {
            $label = 'solr.backend.index_queue_module.flashmessage.error.index_manual';
            $severity = FlashMessage::ERROR;
        }

        $this->addFlashMessage(
            LocalizationUtility::translate($label, 'Solr'),
            LocalizationUtility::translate('solr.backend.index_queue_module.flashmessage.index_manual', 'Solr'),
            $severity
        );

        $this->redirect('index');
    }
public function doIndexingRunAction ( ) { /** @var $indexService \ApacheSolrForTypo3\Solr\Domain\Index\IndexService */ $ indexService = GeneralUtility :: makeInstance ( IndexService :: class , /** @scrutinizer ignore-type */ $ this -> selectedSite ) ; $ indexWithoutErrors = $ indexService -> indexItems ( 10 ) ; $ label = 'solr.backend.index_queue_module.flashmessage.success.index_manual' ; $ severity = FlashMessage :: OK ; if ( ! $ indexWithoutErrors ) { $ label = 'solr.backend.index_queue_module.flashmessage.error.index_manual' ; $ severity = FlashMessage :: ERROR ; } $ this -> addFlashMessage ( LocalizationUtility :: translate ( $ label , 'Solr' ) , LocalizationUtility :: translate ( 'solr.backend.index_queue_module.flashmessage.index_manual' , 'Solr' ) , $ severity ) ; $ this -> redirect ( 'index' ) ; }
Indexes a few documents with the index service.
@return void
@throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
@throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException
Indexes a few documents with the index service .