mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-23 01:36:11 +01:00
Fix CGL issues
Do not introduce unnecessary changes into pull request for TYPO3 CMS 9 update. * Trim trailing whitespace. * Do not introduce blank line before namespace definition with this pull request. * Add posix new line at end of file.
This commit is contained in:
parent
5acdd91865
commit
c940ac4497
7 changed files with 46 additions and 50 deletions
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Codappix\SearchCore;
|
namespace Codappix\SearchCore;
|
||||||
|
|
||||||
use Codappix\SearchCore\Compatibility\ExtensionConfigurationInterface;
|
use Codappix\SearchCore\Compatibility\ExtensionConfigurationInterface;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Codappix\SearchCore\Compatibility;
|
namespace Codappix\SearchCore\Compatibility;
|
||||||
|
|
||||||
use Codappix\SearchCore\Bootstrap;
|
use Codappix\SearchCore\Bootstrap;
|
||||||
|
@ -9,7 +8,7 @@ class ExtensionConfiguration implements ExtensionConfigurationInterface
|
||||||
/**
|
/**
|
||||||
* @return object|\TYPO3\CMS\Core\Configuration\ExtensionConfiguration
|
* @return object|\TYPO3\CMS\Core\Configuration\ExtensionConfiguration
|
||||||
*/
|
*/
|
||||||
protected function _base()
|
private function base()
|
||||||
{
|
{
|
||||||
return Bootstrap::getObjectManager()->get(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class);
|
return Bootstrap::getObjectManager()->get(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class);
|
||||||
}
|
}
|
||||||
|
@ -22,6 +21,6 @@ class ExtensionConfiguration implements ExtensionConfigurationInterface
|
||||||
*/
|
*/
|
||||||
public function get($extensionKey)
|
public function get($extensionKey)
|
||||||
{
|
{
|
||||||
return $this->_base()->get($extensionKey);
|
return $this->base()->get($extensionKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Codappix\SearchCore\Compatibility;
|
namespace Codappix\SearchCore\Compatibility;
|
||||||
|
|
||||||
interface ExtensionConfigurationInterface
|
interface ExtensionConfigurationInterface
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Codappix\SearchCore\Compatibility;
|
namespace Codappix\SearchCore\Compatibility;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -43,7 +42,7 @@ class ImplementationRegistrationService
|
||||||
ExtensionConfigurationInterface::class,
|
ExtensionConfigurationInterface::class,
|
||||||
ExtensionConfiguration::class
|
ExtensionConfiguration::class
|
||||||
);
|
);
|
||||||
} else if (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 8000000) {
|
} elseif (VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version) >= 8000000) {
|
||||||
$container->registerImplementation(
|
$container->registerImplementation(
|
||||||
ExtensionConfigurationInterface::class,
|
ExtensionConfigurationInterface::class,
|
||||||
Version87\ExtensionConfiguration::class
|
Version87\ExtensionConfiguration::class
|
||||||
|
|
|
@ -80,12 +80,9 @@ class ConfigurationContainer implements ConfigurationContainerInterface
|
||||||
*/
|
*/
|
||||||
public function getIfExists(string $path)
|
public function getIfExists(string $path)
|
||||||
{
|
{
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
return ArrayUtility::getValueByPath($this->settings, $path, '.');
|
return ArrayUtility::getValueByPath($this->settings, $path, '.');
|
||||||
}
|
} catch (\Exception $exception) {
|
||||||
catch (\Exception $exception)
|
|
||||||
{
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Codappix\SearchCore\Domain\Index;
|
namespace Codappix\SearchCore\Domain\Index;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -128,7 +127,6 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $record
|
* @param array $record
|
||||||
*
|
*
|
||||||
|
@ -137,12 +135,17 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
protected function prepareRecord(array &$record)
|
protected function prepareRecord(array &$record)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$indexingConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.dataProcessing');
|
$indexingConfiguration = $this->configuration->getIfExists(
|
||||||
|
'indexing.' . $this->identifier . '.dataProcessing'
|
||||||
|
);
|
||||||
|
|
||||||
if (!empty($indexingConfiguration) && is_array($indexingConfiguration)) {
|
if (!empty($indexingConfiguration) && is_array($indexingConfiguration)) {
|
||||||
foreach ($indexingConfiguration as $configuration) {
|
foreach ($indexingConfiguration as $configuration) {
|
||||||
$record = $this->dataProcessorService->executeDataProcessor($configuration, $record,
|
$record = $this->dataProcessorService->executeDataProcessor(
|
||||||
$this->identifier);
|
$configuration,
|
||||||
|
$record,
|
||||||
|
$this->identifier
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@ -158,7 +161,6 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
$this->handleAbstract($record);
|
$this->handleAbstract($record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $record
|
* @param array $record
|
||||||
*
|
*
|
||||||
|
@ -169,8 +171,9 @@ abstract class AbstractIndexer implements IndexerInterface
|
||||||
$record['search_abstract'] = '';
|
$record['search_abstract'] = '';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
$indexConfiguration = $this->configuration->getIfExists(
|
||||||
$indexConfiguration = $this->configuration->getIfExists('indexing.' . $this->identifier . '.abstractFields');
|
'indexing.' . $this->identifier . '.abstractFields'
|
||||||
|
);
|
||||||
|
|
||||||
$fieldsToUse = GeneralUtility::trimExplode(',', $indexConfiguration);
|
$fieldsToUse = GeneralUtility::trimExplode(',', $indexConfiguration);
|
||||||
if ($fieldsToUse === []) {
|
if ($fieldsToUse === []) {
|
||||||
|
|
Loading…
Reference in a new issue