first commit

This commit is contained in:
Sven Wappler
2021-04-17 21:20:54 +02:00
parent c93ec9492a
commit cadcc8edb4
406 changed files with 4917 additions and 5157 deletions

View File

@@ -60,18 +60,18 @@ class FlexFormUserFunctions
return;
}
$newItems = $this->getParsedSolrFieldsFromSchema($configuredFacets, $pageRecord);
$newItems = $this->getParsedMeilisearchFieldsFromSchema($configuredFacets, $pageRecord);
$parentInformation['items'] = $newItems;
}
/**
* This method parses the solr schema fields into the required format for the backend flexform.
* This method parses the meilisearch schema fields into the required format for the backend flexform.
*
* @param array $configuredFacets
* @param array $pageRecord
* @return mixed
*/
protected function getParsedSolrFieldsFromSchema($configuredFacets, $pageRecord)
protected function getParsedMeilisearchFieldsFromSchema($configuredFacets, $pageRecord)
{
$newItems = [];
@@ -96,7 +96,7 @@ class FlexFormUserFunctions
}
$newItems[$value] = [$label, $value];
}, $this->getFieldNamesFromSolrMetaDataForPage($pageRecord));
}, $this->getFieldNamesFromMeilisearchMetaDataForPage($pageRecord));
ksort($newItems, SORT_NATURAL);
return $newItems;
@@ -126,11 +126,11 @@ class FlexFormUserFunctions
}
/**
* Get solr connection.
* Get meilisearch connection.
*
* @param array $pageRecord
*
* @return \WapplerSystems\Meilisearch\System\Solr\SolrConnection
* @return \WapplerSystems\Meilisearch\System\Meilisearch\MeilisearchConnection
*/
protected function getConnection(array $pageRecord)
{
@@ -138,12 +138,12 @@ class FlexFormUserFunctions
}
/**
* Retrieves all fieldnames that occure in the solr schema for one page.
* Retrieves all fieldnames that occure in the meilisearch schema for one page.
*
* @param array $pageRecord
* @return array
*/
protected function getFieldNamesFromSolrMetaDataForPage(array $pageRecord)
protected function getFieldNamesFromMeilisearchMetaDataForPage(array $pageRecord)
{
return array_keys((array)$this->getConnection($pageRecord)->getAdminService()->getFieldsMetaData());
}
@@ -184,7 +184,7 @@ class FlexFormUserFunctions
*/
protected function getConfigurationFromPageId($pid)
{
$typoScriptConfiguration = $this->frontendEnvironment->getSolrConfigurationFromPageId($pid);
$typoScriptConfiguration = $this->frontendEnvironment->getMeilisearchConfigurationFromPageId($pid);
return $typoScriptConfiguration;
}