public function clearSearchIndexAction()
    {
        // get uri builder
        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);

        // admin only access
        if ($this->getBackendUser()->isAdmin()) {
            if ($this->do == 'clear') {
                $databaseConnection = Db::getDatabaseConnection('tx_kesearch_index');
                $databaseConnection->truncate('tx_kesearch_index');
            }
        }

        // build "clear index" link
        $moduleUrl = $uriBuilder->buildUriFromRoute(
            'web_KeSearchBackendModule',
            [
                'id' => $this->id,
                'do' => 'clear'
            ]
        );

        $this->view->assign('moduleUrl', $moduleUrl);
        $this->view->assign('isAdmin', $this->getBackendUser()->isAdmin());
        $this->view->assign('indexCount', $this->getNumberOfRecordsInIndex());

    }
public function clearSearchIndexAction()
    {
        // get uri builder
        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);

        // admin only access
        if ($this->getBackendUser()->isAdmin()) {
            if ($this->do == 'clear') {
                $databaseConnection = Db::getDatabaseConnection('tx_kesearch_index');
                $databaseConnection->truncate('tx_kesearch_index');
            }
        }

        // build "clear index" link
        $moduleUrl = $uriBuilder->buildUriFromRoute(
            'web_KeSearchBackendModule',
            [
                'id' => $this->id,
                'do' => 'clear'
            ]
        );

        $this->view->assign('moduleUrl', $moduleUrl);
        $this->view->assign('isAdmin', $this->getBackendUser()->isAdmin());
        $this->view->assign('indexCount', $this->getNumberOfRecordsInIndex());

    }
public function clearSearchIndexAction ( ) { // get uri builder $ uriBuilder = GeneralUtility :: makeInstance ( UriBuilder :: class ) ; // admin only access if ( $ this -> getBackendUser ( ) -> isAdmin ( ) ) { if ( $ this -> do == 'clear' ) { $ databaseConnection = Db :: getDatabaseConnection ( 'tx_kesearch_index' ) ; $ databaseConnection -> truncate ( 'tx_kesearch_index' ) ; } } // build "clear index" link $ moduleUrl = $ uriBuilder -> buildUriFromRoute ( 'web_KeSearchBackendModule' , [ 'id' => $ this -> id , 'do' => 'clear' ] ) ; $ this -> view -> assign ( 'moduleUrl' , $ moduleUrl ) ; $ this -> view -> assign ( 'isAdmin' , $ this -> getBackendUser ( ) -> isAdmin ( ) ) ; $ this -> view -> assign ( 'indexCount' , $ this -> getNumberOfRecordsInIndex ( ) ) ; }
clear search index action
clear search index action