loadSynonyms(); $vars['support'] = true; return $vars; } public function handle() { if (!getVal('Submit') && !getVal('Reindex')) { return; } /** @var FulltextInterface $fulltext */ $fulltext = ServiceContainer::getService(FulltextInterface::class); $data = $this->getData(); $synonyms = []; foreach ($data as $line) { if (!empty($line['from']) && !empty($line['to']) && !key_exists('delete', $line)) { $synonyms[] = $line; } } $fulltext->updateSynonyms($synonyms); if (getVal('Reindex')) { ini_set('max_execution_time', 500); try { $this->updateIndices(); } catch (\KupShop\CatalogBundle\Search\Exception\FulltextException $e) { getRaven()->captureException($e); $this->returnError('Nastala chyba při generování vyhledávácího indexu'); } } $this->handleTabs(true); $this->returnOK(); } public function hasRights($name = null) { switch ($name) { case Window::RIGHT_DUPLICATE: case Window::RIGHT_DELETE: return false; default: return parent::hasRights($name); } } }