public function ExportPluginManager::executeExport in Search API Synonym 8
Execute the synonym export.
Return value
mixed Export result
File
- src/
Export/ ExportPluginManager.php, line 143
Class
- ExportPluginManager
- Base class for search api synonym export plugin managers.
Namespace
Drupal\search_api_synonym\ExportCode
public function executeExport() {
// Export plugin instance
$instance = $this
->createInstance($this
->getPluginId(), []);
// Get synonyms data matching the options.
$synonyms = $this
->getSynonymsData();
// We only export if full export or if their is new synonyms.
if (!($this
->getExportOption('incremental') && empty($synonyms))) {
// Get data in the plugin instance format
$data = $instance
->getFormattedSynonyms($synonyms);
return $this
->saveSynonymsFile($data);
}
else {
return FALSE;
}
}