diff --git a/Classes/Command/BaseCommand.php b/Classes/Command/BaseCommand.php
index 9414bbd72..a974be94f 100644
--- a/Classes/Command/BaseCommand.php
+++ b/Classes/Command/BaseCommand.php
@@ -346,7 +346,7 @@ private function addCollections(Document &$document, array $collections): void
$documentCollection = GeneralUtility::makeInstance(Collection::class);
$documentCollection->setIndexName($collection);
$documentCollection->setLabel($collection);
- $documentCollection->setOaiName((!empty($this->extConf['publishNewCollections']) ? Helper::getCleanString($collection) : ''));
+ $documentCollection->setOaiName((!empty($this->extConf['general']['publishNewCollections']) ? Helper::getCleanString($collection) : ''));
$documentCollection->setIndexSearch('');
$documentCollection->setDescription('');
// add to CollectionRepository
diff --git a/Classes/Common/AbstractDocument.php b/Classes/Common/AbstractDocument.php
index afa809479..9620c4799 100644
--- a/Classes/Common/AbstractDocument.php
+++ b/Classes/Common/AbstractDocument.php
@@ -562,8 +562,8 @@ public static function &getInstance(string $location, array $settings = [], bool
$contentAsJsonArray = json_decode($content, true);
if ($contentAsJsonArray !== null) {
IiifHelper::setUrlReader(IiifUrlReader::getInstance());
- IiifHelper::setMaxThumbnailHeight($extConf['iiifThumbnailHeight']);
- IiifHelper::setMaxThumbnailWidth($extConf['iiifThumbnailWidth']);
+ IiifHelper::setMaxThumbnailHeight($extConf['iiif']['thumbnailHeight']);
+ IiifHelper::setMaxThumbnailWidth($extConf['iiif']['thumbnailWidth']);
$iiif = IiifHelper::loadIiifResource($contentAsJsonArray);
if ($iiif instanceof IiifResourceInterface) {
$documentFormat = 'IIIF';
@@ -653,7 +653,7 @@ protected function getFullTextFromXml(string $id): string
// ... physical structure ...
$this->magicGetPhysicalStructure();
// ... and extension configuration.
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
$fileGrpsFulltext = GeneralUtility::trimExplode(',', $extConf['fileGrpFulltext']);
$textFormat = "";
if (!empty($this->physicalStructureInfo[$id])) {
diff --git a/Classes/Common/Helper.php b/Classes/Common/Helper.php
index 948b94480..06150fea6 100644
--- a/Classes/Common/Helper.php
+++ b/Classes/Common/Helper.php
@@ -976,14 +976,14 @@ public static function getUrl(string $url)
}
// Get extension configuration.
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf');
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf', 'general');
/** @var RequestFactory $requestFactory */
$requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
$configuration = [
'timeout' => 30,
'headers' => [
- 'User-Agent' => $extConf['useragent'] ?? 'Kitodo.Presentation Proxy',
+ 'User-Agent' => $extConf['userAgent'] ?? 'Kitodo.Presentation Proxy',
],
];
try {
diff --git a/Classes/Common/IiifManifest.php b/Classes/Common/IiifManifest.php
index 3400f74cf..7dfbf8565 100644
--- a/Classes/Common/IiifManifest.php
+++ b/Classes/Common/IiifManifest.php
@@ -233,7 +233,7 @@ protected function getUseGroups(string $use)
{
if (!$this->useGrpsLoaded) {
// Get configured USE attributes.
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
if (!empty($extConf['fileGrpImages'])) {
$this->useGrps['fileGrpImages'] = GeneralUtility::trimExplode(',', $extConf['fileGrpImages']);
}
@@ -264,7 +264,7 @@ protected function magicGetPhysicalStructure(): array
if ($this->iiif == null || !($this->iiif instanceof ManifestInterface)) {
return [];
}
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'iiif');
$iiifId = $this->iiif->getId();
$this->physicalStructureInfo[$iiifId]['id'] = $iiifId;
$this->physicalStructureInfo[$iiifId]['dmdId'] = $iiifId;
@@ -754,7 +754,7 @@ public function getFullText(string $id): string
$this->magicGetPhysicalStructure();
// ... and extension configuration.
$extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
- $fileGrpsFulltext = GeneralUtility::trimExplode(',', $extConf['fileGrpFulltext']);
+ $fileGrpsFulltext = GeneralUtility::trimExplode(',', $extConf['files']['fileGrpFulltext']);
if (!empty($this->physicalStructureInfo[$id])) {
while ($fileGrpFulltext = array_shift($fileGrpsFulltext)) {
if (!empty($this->physicalStructureInfo[$id]['files'][$fileGrpFulltext])) {
@@ -762,7 +762,7 @@ public function getFullText(string $id): string
break;
}
}
- if ($extConf['indexAnnotations'] == 1) {
+ if ($extConf['iiif']['indexAnnotations'] == 1) {
$iiifResource = $this->iiif->getContainedResourceById($id);
// Get annotation containers
$annotationContainerIds = $this->physicalStructureInfo[$id]['annotationContainers'];
@@ -807,10 +807,10 @@ protected function loadLocation(string $location): bool
{
$fileResource = GeneralUtility::getUrl($location);
if ($fileResource !== false) {
- $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'iiif');
IiifHelper::setUrlReader(IiifUrlReader::getInstance());
- IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']);
- IiifHelper::setMaxThumbnailWidth($conf['iiifThumbnailWidth']);
+ IiifHelper::setMaxThumbnailHeight($conf['thumbnailHeight']);
+ IiifHelper::setMaxThumbnailWidth($conf['thumbnailWidth']);
$resource = IiifHelper::loadIiifResource($fileResource);
if ($resource instanceof ManifestInterface) {
$this->iiif = $resource;
@@ -865,7 +865,7 @@ protected function ensureHasFulltextIsSet(): void
$this->hasFulltext = true;
return;
}
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'iiif');
if ($extConf['indexAnnotations'] == 1 && !empty($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING))) {
foreach ($canvas->getPossibleTextAnnotationContainers(Motivation::PAINTING) as $annotationContainer) {
$textAnnotations = $annotationContainer->getTextAnnotations(Motivation::PAINTING);
@@ -998,10 +998,10 @@ private function setFileUseFulltext(string $iiifId, $iiif): void
*/
public function __wakeup(): void
{
- $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'iiif');
IiifHelper::setUrlReader(IiifUrlReader::getInstance());
- IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']);
- IiifHelper::setMaxThumbnailWidth($conf['iiifThumbnailWidth']);
+ IiifHelper::setMaxThumbnailHeight($conf['thumbnailHeight']);
+ IiifHelper::setMaxThumbnailWidth($conf['thumbnailWidth']);
$resource = IiifHelper::loadIiifResource($this->asJson);
if ($resource instanceof ManifestInterface) {
$this->asJson = '';
diff --git a/Classes/Common/Indexer.php b/Classes/Common/Indexer.php
index c48ad9415..1fc45aada 100644
--- a/Classes/Common/Indexer.php
+++ b/Classes/Common/Indexer.php
@@ -423,7 +423,7 @@ protected static function processPhysical(Document $document, int $page, array $
$doc->cPid = $document->getPid();
if ($doc->hasFulltext && $fullText = $doc->getFullText($physicalUnit['id'])) {
// Read extension configuration.
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
// Create new Solr document.
$updateQuery = self::$solr->service->createUpdate();
$solrDoc = self::getSolrDocument($updateQuery, $document, $physicalUnit, $fullText);
diff --git a/Classes/Common/MetsDocument.php b/Classes/Common/MetsDocument.php
index 7f317feb8..61ce57ac4 100644
--- a/Classes/Common/MetsDocument.php
+++ b/Classes/Common/MetsDocument.php
@@ -189,10 +189,10 @@ public function getDownloadLocation(string $id): string
$file = $this->getFileInfo($id);
if ($file['mimeType'] === 'application/vnd.kitodo.iiif') {
$file['location'] = (strrpos($file['location'], 'info.json') === strlen($file['location']) - 9) ? $file['location'] : (strrpos($file['location'], '/') === strlen($file['location']) ? $file['location'] . 'info.json' : $file['location'] . '/info.json');
- $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'iiif');
IiifHelper::setUrlReader(IiifUrlReader::getInstance());
- IiifHelper::setMaxThumbnailHeight($conf['iiifThumbnailHeight']);
- IiifHelper::setMaxThumbnailWidth($conf['iiifThumbnailWidth']);
+ IiifHelper::setMaxThumbnailHeight($conf['thumbnailHeight']);
+ IiifHelper::setMaxThumbnailWidth($conf['thumbnailWidth']);
$service = IiifHelper::loadIiifResource($file['location']);
if ($service instanceof AbstractImageService) {
return $service->getImageUrl();
@@ -400,7 +400,7 @@ protected function getLogicalStructureInfo(\SimpleXMLElement $structure, bool $r
private function getThumbnail(string $id = '')
{
// Load plugin configuration.
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
$fileGrpsThumb = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
$thumbnail = null;
@@ -736,7 +736,7 @@ private function extractMetadataIfTypeSupported(string $dmdId, string $mdSection
if (class_exists($class)) {
$obj = GeneralUtility::makeInstance($class);
if ($obj instanceof MetadataInterface) {
- $obj->extractMetadata($this->mdSec[$dmdId]['xml'], $metadata, GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey)['useExternalApisForMetadata']);
+ $obj->extractMetadata($this->mdSec[$dmdId]['xml'], $metadata, GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'general')['useExternalApisForMetadata']);
return true;
}
} else {
@@ -1108,7 +1108,7 @@ protected function magicGetFileGrps(): array
{
if (!$this->fileGrpsLoaded) {
// Get configured USE attributes.
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
$useGrps = GeneralUtility::trimExplode(',', $extConf['fileGrpImages']);
if (!empty($extConf['fileGrpThumbs'])) {
$useGrps = array_merge($useGrps, GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']));
@@ -1280,7 +1280,7 @@ protected function magicGetThumbnail(bool $forceReload = false): string
return $this->thumbnail;
}
// Load extension configuration.
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
if (empty($extConf['fileGrpThumbs'])) {
$this->logger->warning('No fileGrp for thumbnails specified');
$this->thumbnailLoaded = true;
diff --git a/Classes/Common/Solr/Solr.php b/Classes/Common/Solr/Solr.php
index 9f2b0ce5c..acd6e3a7f 100644
--- a/Classes/Common/Solr/Solr.php
+++ b/Classes/Common/Solr/Solr.php
@@ -243,34 +243,34 @@ public static function escapeQueryKeepField(string $query, int $pid): string
public static function getFields(): array
{
if (empty(self::$fields)) {
- $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
-
- self::$fields['id'] = $conf['solrFieldId'];
- self::$fields['uid'] = $conf['solrFieldUid'];
- self::$fields['pid'] = $conf['solrFieldPid'];
- self::$fields['page'] = $conf['solrFieldPage'];
- self::$fields['partof'] = $conf['solrFieldPartof'];
- self::$fields['root'] = $conf['solrFieldRoot'];
- self::$fields['sid'] = $conf['solrFieldSid'];
- self::$fields['toplevel'] = $conf['solrFieldToplevel'];
- self::$fields['type'] = $conf['solrFieldType'];
- self::$fields['title'] = $conf['solrFieldTitle'];
- self::$fields['volume'] = $conf['solrFieldVolume'];
- self::$fields['date'] = $conf['solrFieldDate'];
- self::$fields['thumbnail'] = $conf['solrFieldThumbnail'];
- self::$fields['default'] = $conf['solrFieldDefault'];
- self::$fields['timestamp'] = $conf['solrFieldTimestamp'];
- self::$fields['autocomplete'] = $conf['solrFieldAutocomplete'];
- self::$fields['fulltext'] = $conf['solrFieldFulltext'];
- self::$fields['record_id'] = $conf['solrFieldRecordId'];
- self::$fields['purl'] = $conf['solrFieldPurl'];
- self::$fields['urn'] = $conf['solrFieldUrn'];
- self::$fields['location'] = $conf['solrFieldLocation'];
- self::$fields['collection'] = $conf['solrFieldCollection'];
- self::$fields['license'] = $conf['solrFieldLicense'];
- self::$fields['terms'] = $conf['solrFieldTerms'];
- self::$fields['restrictions'] = $conf['solrFieldRestrictions'];
- self::$fields['geom'] = $conf['solrFieldGeom'];
+ $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'solr');
+ $solrFields = $conf['fields'];
+ self::$fields['id'] = $solrFields['id'];
+ self::$fields['uid'] = $solrFields['uid'];
+ self::$fields['pid'] = $solrFields['pid'];
+ self::$fields['page'] = $solrFields['page'];
+ self::$fields['partof'] = $solrFields['partof'];
+ self::$fields['root'] = $solrFields['root'];
+ self::$fields['sid'] = $solrFields['sid'];
+ self::$fields['toplevel'] = $solrFields['toplevel'];
+ self::$fields['type'] = $solrFields['type'];
+ self::$fields['title'] = $solrFields['title'];
+ self::$fields['volume'] = $solrFields['volume'];
+ self::$fields['date'] = $solrFields['date'];
+ self::$fields['thumbnail'] = $solrFields['thumbnail'];
+ self::$fields['default'] = $solrFields['default'];
+ self::$fields['timestamp'] = $solrFields['timestamp'];
+ self::$fields['autocomplete'] = $solrFields['autocomplete'];
+ self::$fields['fulltext'] = $solrFields['fulltext'];
+ self::$fields['record_id'] = $solrFields['recordId'];
+ self::$fields['purl'] = $solrFields['purl'];
+ self::$fields['urn'] = $solrFields['urn'];
+ self::$fields['location'] = $solrFields['location'];
+ self::$fields['collection'] = $solrFields['collection'];
+ self::$fields['license'] = $solrFields['license'];
+ self::$fields['terms'] = $solrFields['terms'];
+ self::$fields['restrictions'] = $solrFields['restrictions'];
+ self::$fields['geom'] = $solrFields['geom'];
}
return self::$fields;
@@ -350,25 +350,25 @@ protected function loadSolrConnectionInfo(): void
if (empty($this->config)) {
$config = [];
// Extract extension configuration.
- $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
+ $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'solr');
// Derive Solr scheme
- $config['scheme'] = empty($conf['solrHttps']) ? 'http' : 'https';
+ $config['scheme'] = empty($conf['https']) ? 'http' : 'https';
// Derive Solr host name.
- $config['host'] = ($conf['solrHost'] ? $conf['solrHost'] : '127.0.0.1');
+ $config['host'] = ($conf['host'] ? $conf['host'] : '127.0.0.1');
// Set username and password.
- $config['username'] = $conf['solrUser'];
- $config['password'] = $conf['solrPass'];
+ $config['username'] = $conf['user'];
+ $config['password'] = $conf['pass'];
// Set port if not set.
- $config['port'] = MathUtility::forceIntegerInRange($conf['solrPort'], 1, 65535, 8983);
+ $config['port'] = MathUtility::forceIntegerInRange($conf['port'], 1, 65535, 8983);
// Trim path of slashes and (re-)add trailing slash if path not empty.
- $config['path'] = trim($conf['solrPath'], '/');
+ $config['path'] = trim($conf['path'], '/');
if (!empty($config['path'])) {
$config['path'] .= '/';
}
// Set connection timeout lower than PHP's max_execution_time.
$maxExecutionTime = (int) ini_get('max_execution_time') ? : 30;
- $config['timeout'] = MathUtility::forceIntegerInRange($conf['solrTimeout'], 1, $maxExecutionTime, 10);
+ $config['timeout'] = MathUtility::forceIntegerInRange($conf['timeout'], 1, $maxExecutionTime, 10);
$this->config = $config;
}
}
diff --git a/Classes/Controller/AbstractController.php b/Classes/Controller/AbstractController.php
index e7db9f0ee..cc617ad09 100644
--- a/Classes/Controller/AbstractController.php
+++ b/Classes/Controller/AbstractController.php
@@ -166,7 +166,7 @@ protected function configureProxyUrl(string &$url): void
{
$this->uriBuilder->reset()
->setTargetPageUid($GLOBALS['TSFE']->id)
- ->setCreateAbsoluteUri(!empty($this->settings['forceAbsoluteUrl']))
+ ->setCreateAbsoluteUri(!empty($this->settings['general']['forceAbsoluteUrl']))
->setArguments(
[
'eID' => 'tx_dlf_pageview_proxy',
diff --git a/Classes/Controller/AudioPlayerController.php b/Classes/Controller/AudioPlayerController.php
index c546cd5b7..1ac7dfc87 100644
--- a/Classes/Controller/AudioPlayerController.php
+++ b/Classes/Controller/AudioPlayerController.php
@@ -85,7 +85,7 @@ public function mainAction(): void
$this->setDefaultPage();
// Check if there are any audio files available.
- $fileGrpsAudio = GeneralUtility::trimExplode(',', $this->extConf['fileGrpAudio']);
+ $fileGrpsAudio = GeneralUtility::trimExplode(',', $this->extConf['files']['fileGrpAudio']);
while ($fileGrpAudio = array_shift($fileGrpsAudio)) {
$physicalStructureInfo = $this->document->getCurrentDocument()->physicalStructureInfo[$this->document->getCurrentDocument()->physicalStructure[$this->requestData['page']]];
$fileId = $physicalStructureInfo['files'][$fileGrpAudio];
diff --git a/Classes/Controller/PageGridController.php b/Classes/Controller/PageGridController.php
index e0b864b1d..539d0b66b 100644
--- a/Classes/Controller/PageGridController.php
+++ b/Classes/Controller/PageGridController.php
@@ -37,7 +37,7 @@ public function mainAction(): void
$this->loadDocument();
if (
$this->isDocMissingOrEmpty()
- || empty($this->extConf['fileGrpThumbs'])
+ || empty($this->extConf['files']['fileGrpThumbs'])
) {
// Quit without doing anything if required variables are not set.
return;
@@ -48,7 +48,7 @@ public function mainAction(): void
$numPages = $this->document->getCurrentDocument()->numPages;
// Iterate through visible page set and display thumbnails.
for ($i = 1; $i <= $numPages; $i++) {
- $foundEntry = $this->getEntry($i, $this->extConf['fileGrpThumbs']);
+ $foundEntry = $this->getEntry($i, $this->extConf['files']['fileGrpThumbs']);
$foundEntry['state'] = ($i == $this->requestData['page']) ? 'cur' : 'no';
$entryArray[] = $foundEntry;
}
diff --git a/Classes/Controller/PageViewController.php b/Classes/Controller/PageViewController.php
index dc7d0089b..5cb106079 100644
--- a/Classes/Controller/PageViewController.php
+++ b/Classes/Controller/PageViewController.php
@@ -84,7 +84,7 @@ public function mainAction(): void
// Get the controls for the map.
$this->controls = explode(',', $this->settings['features']);
- $this->view->assign('forceAbsoluteUrl', $this->settings['forceAbsoluteUrl']);
+ $this->view->assign('forceAbsoluteUrl', $this->settings['general']['forceAbsoluteUrl']);
$this->addViewerJS();
@@ -106,7 +106,7 @@ protected function getFulltext(int $page): array
{
$fulltext = [];
// Get fulltext link.
- $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->extConf['fileGrpFulltext']);
+ $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->extConf['files']['fileGrpFulltext']);
while ($fileGrpFulltext = array_shift($fileGrpsFulltext)) {
$physicalStructureInfo = $this->document->getCurrentDocument()->physicalStructureInfo[$this->document->getCurrentDocument()->physicalStructure[$page]];
$fileId = $physicalStructureInfo['files'][$fileGrpFulltext];
@@ -123,7 +123,7 @@ protected function getFulltext(int $page): array
}
}
if (empty($fulltext)) {
- $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->extConf['fileGrpFulltext'] . '"');
+ $this->logger->notice('No full-text file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpFulltext'] . '"');
}
return $fulltext;
}
@@ -223,7 +223,7 @@ protected function getImage(int $page): array
{
$image = [];
// Get @USE value of METS fileGrp.
- $fileGrpsImages = GeneralUtility::trimExplode(',', $this->extConf['fileGrpImages']);
+ $fileGrpsImages = GeneralUtility::trimExplode(',', $this->extConf['files']['fileGrpImages']);
while ($fileGrpImages = array_pop($fileGrpsImages)) {
// Get image link.
$physicalStructureInfo = $this->document->getCurrentDocument()->physicalStructureInfo[$this->document->getCurrentDocument()->physicalStructure[$page]];
@@ -244,7 +244,7 @@ protected function getImage(int $page): array
}
}
if (empty($image)) {
- $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->extConf['fileGrpImages'] . '"');
+ $this->logger->warning('No image file found for page "' . $page . '" in fileGrps "' . $this->extConf['files']['fileGrpImages'] . '"');
}
return $image;
}
diff --git a/Classes/Controller/ToolboxController.php b/Classes/Controller/ToolboxController.php
index 353c5522b..67c0580a2 100644
--- a/Classes/Controller/ToolboxController.php
+++ b/Classes/Controller/ToolboxController.php
@@ -160,7 +160,7 @@ private function renderFulltextDownloadTool(): void
{
if (
$this->isDocMissingOrEmpty()
- || empty($this->extConf['fileGrpFulltext'])
+ || empty($this->extConf['files']['fileGrpFulltext'])
) {
// Quit without doing anything if required variables are not set.
return;
@@ -184,7 +184,7 @@ private function renderFulltextTool(): void
{
if (
$this->isDocMissingOrEmpty()
- || empty($this->extConf['fileGrpFulltext'])
+ || empty($this->extConf['files']['fileGrpFulltext'])
) {
// Quit without doing anything if required variables are not set.
return;
@@ -297,7 +297,7 @@ private function renderPdfDownloadTool(): void
{
if (
$this->isDocMissingOrEmpty()
- || empty($this->extConf['fileGrpDownload'])
+ || empty($this->extConf['files']['fileGrpDownload'])
) {
// Quit without doing anything if required variables are not set.
return;
@@ -324,7 +324,7 @@ private function getPageLink(): array
$secondPageLink = '';
$pageLinkArray = [];
$pageNumber = $this->requestData['page'];
- $fileGrpsDownload = GeneralUtility::trimExplode(',', $this->extConf['fileGrpDownload']);
+ $fileGrpsDownload = GeneralUtility::trimExplode(',', $this->extConf['files']['fileGrpDownload']);
// Get image link.
while ($fileGrpDownload = array_shift($fileGrpsDownload)) {
$firstFileGroupDownload = $this->currentDocument->physicalStructureInfo[$this->currentDocument->physicalStructure[$pageNumber]]['files'][$fileGrpDownload];
@@ -346,7 +346,7 @@ private function getPageLink(): array
empty($firstPageLink)
&& empty($secondPageLink)
) {
- $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"');
+ $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
}
if (!empty($firstPageLink)) {
@@ -368,7 +368,7 @@ private function getPageLink(): array
private function getWorkLink(): string
{
$workLink = '';
- $fileGrpsDownload = GeneralUtility::trimExplode(',', $this->extConf['fileGrpDownload']);
+ $fileGrpsDownload = GeneralUtility::trimExplode(',', $this->extConf['files']['fileGrpDownload']);
// Get work link.
while ($fileGrpDownload = array_shift($fileGrpsDownload)) {
$fileGroupDownload = $this->currentDocument->physicalStructureInfo[$this->currentDocument->physicalStructure[0]]['files'][$fileGrpDownload];
@@ -384,7 +384,7 @@ private function getWorkLink(): string
}
}
if (empty($workLink)) {
- $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"');
+ $this->logger->warning('File not found in fileGrps "' . $this->extConf['files']['fileGrpDownload'] . '"');
}
return $workLink;
}
@@ -401,7 +401,7 @@ private function renderSearchInDocumentTool(): void
{
if (
$this->isDocMissingOrEmpty()
- || empty($this->extConf['fileGrpFulltext'])
+ || empty($this->extConf['files']['fileGrpFulltext'])
|| empty($this->settings['solrcore'])
) {
// Quit without doing anything if required variables are not set.
@@ -496,7 +496,7 @@ private function getEncryptedCoreName(): string
*/
private function isFullTextEmpty(): bool
{
- $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->extConf['fileGrpFulltext']);
+ $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->extConf['files']['fileGrpFulltext']);
while ($fileGrpFulltext = array_shift($fileGrpsFulltext)) {
$fullTextFile = $this->currentDocument->physicalStructureInfo[$this->currentDocument->physicalStructure[$this->requestData['page']]]['files'][$fileGrpFulltext];
if (!empty($fullTextFile)) {
diff --git a/Classes/Eid/PageViewProxy.php b/Classes/Eid/PageViewProxy.php
index d745b5064..99d3fc37c 100644
--- a/Classes/Eid/PageViewProxy.php
+++ b/Classes/Eid/PageViewProxy.php
@@ -58,7 +58,7 @@ class PageViewProxy
public function __construct()
{
$this->requestFactory = GeneralUtility::makeInstance(RequestFactory::class);
- $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf');
+ $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf', 'general');
}
/**
@@ -148,7 +148,7 @@ protected function handleHead(ServerRequestInterface $request): ResponseInterfac
try {
$targetResponse = $this->requestFactory->request($url, 'HEAD', [
'headers' => [
- 'User-Agent' => $this->extConf['useragent'] ?? 'Kitodo.Presentation Proxy',
+ 'User-Agent' => $this->extConf['userAgent'] ?? 'Kitodo.Presentation Proxy',
]
]);
} catch (\Exception $e) {
@@ -193,7 +193,7 @@ protected function handleGet(ServerRequestInterface $request): ResponseInterface
try {
$targetResponse = $this->requestFactory->request($url, 'GET', [
'headers' => [
- 'User-Agent' => $this->extConf['useragent'] ?? 'Kitodo.Presentation Proxy',
+ 'User-Agent' => $this->extConf['userAgent'] ?? 'Kitodo.Presentation Proxy',
],
// For performance, don't download content up-front. Rather, we'll
diff --git a/Classes/Hooks/DataHandler.php b/Classes/Hooks/DataHandler.php
index fcce799ec..cf2461210 100644
--- a/Classes/Hooks/DataHandler.php
+++ b/Classes/Hooks/DataHandler.php
@@ -356,8 +356,8 @@ public function processCmdmap_postProcess(string $command, string $table, $id):
&& $table == 'tx_dlf_solrcores'
) {
// Is core deletion allowed in extension configuration?
- $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf');
- if (!empty($extConf['solrAllowCoreDelete'])) {
+ $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf', 'solr');
+ if (!empty($extConf['allowCoreDelete'])) {
// Delete core from Apache Solr as well.
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable('tx_dlf_solrcores');
diff --git a/Resources/Private/Language/de.locallang_labels.xlf b/Resources/Private/Language/de.locallang_labels.xlf
index 0d3adafda..b9101521e 100644
--- a/Resources/Private/Language/de.locallang_labels.xlf
+++ b/Resources/Private/Language/de.locallang_labels.xlf
@@ -629,214 +629,214 @@
DLF: Werkzeugkasten
-
+
Standard-Namensräume für Metadaten
-
-
- Internen Proxy für Werkansicht aktivieren? (Standard ist "FALSE")
-
-
- DLF User-Agent: (Standard ist "Kitodo.Presentation")
-
-
-
- Verwende nur absolute Links für Seiten und Ressourcen?: Wird nur in speziellen Multi-Domain-Umgebungen benötigt; erfordert einen voll qualifizierten Einstiegspunkt in der Seitenkonfiguration (Standard ist "FALSE")
-
-
-
- Verwende HTTPS for absolute Links?: erfordert einen Einstiegspunkt mit "https://..." in der Seitenkonfiguration (Standard ist "FALSE")
-
-
-
- Eingelesene METS Dateien / IIIF-Manifeste zwischenspeichern: Dies kann die Geschwindigkeit geringfügig verbessern, führt aber zu einer sehr großen "fe_session_data" Tabelle (Standard ist "FALSE")
-
-
-
- Neue Kollektionen publizieren?: Sollen neue Kollektionen automatisch in der OAI-PMH-Schnittstelle veröffentlicht werden? (Standard ist "TRUE")
-
-
-
-
- Indexierte Dokumente einblenden?: Sollen ausgeblendete Dokumente bei der erneuten Indexierung wieder eingeblendet werden? (Standard ist "FALSE")
-
-
- Verwende externe APIs zum Abrufen von Metadaten?: (Standard ist "FALSE")
-
-
-
- Seiten fileGrps: Komma-getrennte Liste der @USE Attributwerte der Seitenansichten nach aufsteigender Größe sortiert (Standard ist "DEFAULT,MAX")
-
-
-
- Vorschau fileGrp: Komma-getrennte Liste der @USE Attributwerte der Vorschaubilder nach absteigender Priorität sortiert (Standard ist "THUMBS")
-
-
-
- Download fileGrp: Komma-getrennte Liste der @USE Attributwerte der Downloads nach absteigender Priorität sortiert (Standard ist "DOWNLOAD")
-
-
-
- Volltext fileGrp: Komma-getrennte Liste der @USE Attributwerte der Volltexte nach absteigender Priorität sortiert (Standard ist "FULLTEXT")
-
-
-
- Audio fileGrp: Komma-getrennte Liste der @USE Attributwerte der Audiodateien nach absteigender Priorität sortiert (Standard ist "AUDIO")
-
-
-
- IIIF-Annotationen mit Motivation "painting" als Volltext behandeln?: Als Volltext behandelte Annotationen werden im Suchid idiert (Standard ist "FALSE")
-
-
-
- Maximale Thumbnail-Breite für IIIF-Images: Gilt nur für Bilder ohne Thumbnail-Angaben (Standard ist "150")
-
-
-
- Maximale Thumbnail-Höhe für IIIF-Images: Gilt nur für Bilder ohne Thumbnail-Angaben (Standard ist "150")
-
-
-
-
- Solr Verbindung
-
-
- HTTPS verwenden: (Standard ist "FALSE")
-
-
-
- Solr Server Host: (Standard ist "localhost")
-
-
-
- Solr Server Port: (Standard ist "8983")
-
-
-
- Solr Server Pfad: ohne API-Endpunkt "/solr" (Standard ist "/")
-
-
-
- Solr Server Benutzername: (Standard ist "")
-
-
-
- Solr Server Kennwort: (Standard ist "")
-
-
-
- Solr Server Timeout: (Standard ist "10")
-
-
-
- Löschen von Solr Kern zulassen?: Soll beim Löschen eines Solr Kerns im TYPO3 Backend auch der entsprechende Index in Apache Solr gelöscht werden? (Standard ist "FALSE")
-
-
-
- Solr-Schema-Feld "id" : Unique identifier for the document in the id (Standard ist "id")
-
-
-
- Solr-Schema-Feld "uid" : Unique identifier for the document (or its top-level parent) in the TYPO3 database (Standard ist "uid")
-
-
-
- Solr-Schema-Feld "pid" : PageID for the document (or its top-level parent) in the TYPO3 database (Standard ist "pid")
-
-
-
- Solr-Schema-Feld "page" : Image number where this document starts (Standard ist "page")
-
-
-
- Solr-Schema-Feld "partof" : Unique identifier for the parent document in the TYPO3 database. Only if this is a multi-volume work! (Standard ist "partof")
-
-
-
- Solr-Schema-Feld "root" : Unique identifier for the root document in the TYPO3 database. Only if this is a multi-volume work! (Standard ist "root")
-
-
-
- Solr-Schema-Feld "sid" : XML ID of this document in the METS file. This is only unique within the METS file! (Standard ist "sid")
-
-
-
- Solr-Schema-Feld "toplevel" : Information if it is a top-level document (Standard ist "toplevel")
-
-
-
- Solr-Schema-Feld "type" : Type of document (eg. monograph, chapter, etc.) (Standard ist "type")
-
-
-
- Solr-Schema-Feld "title" : Title field is mandatory for identifying documents (Standard ist "title")
-
-
-
- Solr-Schema-Feld "volume" : Volume field is mandatory for identifying documents (Standard ist "volume")
-
-
-
- Solr Schema Field "date" : The date a resource was issued or created. Used for datesearch (Standard ist "date")
-
-
-
- Solr-Schema-Feld "thumbnail" : URL of thumbnail image for the document (Standard ist "thumbnail")
-
-
-
- Solr-Schema-Feld "default" : CatchAll field (Standard ist "default")
-
-
-
- Solr-Schema-Feld "timestamp" : (Standard ist "timestamp")
-
-
-
- Solr-Schema-Feld "autocomplete" : Autocomplete field for search form (Standard ist "autocomplete")
-
-
-
- Solr-Schema-Feld "fulltext" : Fulltext field for OCR results (Standard ist "fulltext")
-
-
-
- Solr-Schema-Feld "record_id" : Record ID of the document (required for OAI_DC output) (Standard ist "record_id")
-
-
-
- Solr-Schema-Feld "purl" : Permanent URL of the document (required for EPICUR output) (Standard ist "purl")
-
-
-
- Solr-Schema-Feld "urn" : URN of the Document (required for EPICUR output) (Standard ist "urn")
-
-
-
- Solr-Schema-Feld "location" : Location of METS XML (required for METS output) (Standard ist "location")
-
-
-
- Solr-Schema-Feld "collection" : Associated collection(s) of the document (Standard ist "collection")
-
-
-
- Solr-Schema-Feld "license" : License (should be URI) (Standard ist "license")
-
-
-
- Solr-Schema-Feld "terms" : Term of Use (should be URI) (Standard ist "terms")
-
-
-
- Solr-Schema-Feld "restrictions" : Access Restrictions (should be URI) (Standard ist "restrictions")
-
-
-
- Solr-Schema-Feld "geom" : GeoJSON geometry for spatial search (Standard ist "geom")
-
-
+
+
+ Internen Proxy für Werkansicht aktivieren? (Standard ist "FALSE")
+
+
+ DLF User-Agent: (Standard ist "Kitodo.Presentation")
+
+
+
+ Verwende nur absolute Links für Seiten und Ressourcen?: Wird nur in speziellen Multi-Domain-Umgebungen benötigt; erfordert einen voll qualifizierten Einstiegspunkt in der Seitenkonfiguration (Standard ist "FALSE")
+
+
+
+ Verwende HTTPS for absolute Links?: erfordert einen Einstiegspunkt mit "https://..." in der Seitenkonfiguration (Standard ist "FALSE")
+
+
+
+ Eingelesene METS Dateien / IIIF-Manifeste zwischenspeichern: Dies kann die Geschwindigkeit geringfügig verbessern, führt aber zu einer sehr großen "fe_session_data" Tabelle (Standard ist "FALSE")
+
+
+
+ Neue Kollektionen publizieren?: Sollen neue Kollektionen automatisch in der OAI-PMH-Schnittstelle veröffentlicht werden? (Standard ist "TRUE")
+
+
+
+
+ Indexierte Dokumente einblenden?: Sollen ausgeblendete Dokumente bei der erneuten Indexierung wieder eingeblendet werden? (Standard ist "FALSE")
+
+
+ Verwende externe APIs zum Abrufen von Metadaten?: (Standard ist "FALSE")
+
+
+
+ Seiten fileGrps: Komma-getrennte Liste der @USE Attributwerte der Seitenansichten nach aufsteigender Größe sortiert (Standard ist "DEFAULT,MAX")
+
+
+
+ Vorschau fileGrp: Komma-getrennte Liste der @USE Attributwerte der Vorschaubilder nach absteigender Priorität sortiert (Standard ist "THUMBS")
+
+
+
+ Download fileGrp: Komma-getrennte Liste der @USE Attributwerte der Downloads nach absteigender Priorität sortiert (Standard ist "DOWNLOAD")
+
+
+
+ Volltext fileGrp: Komma-getrennte Liste der @USE Attributwerte der Volltexte nach absteigender Priorität sortiert (Standard ist "FULLTEXT")
+
+
+
+ Audio fileGrp: Komma-getrennte Liste der @USE Attributwerte der Audiodateien nach absteigender Priorität sortiert (Standard ist "AUDIO")
+
+
+
+ IIIF-Annotationen mit Motivation "painting" als Volltext behandeln?: Als Volltext behandelte Annotationen werden im Suchid idiert (Standard ist "FALSE")
+
+
+
+ Maximale Thumbnail-Breite für IIIF-Images: Gilt nur für Bilder ohne Thumbnail-Angaben (Standard ist "150")
+
+
+
+ Maximale Thumbnail-Höhe für IIIF-Images: Gilt nur für Bilder ohne Thumbnail-Angaben (Standard ist "150")
+
+
+
+
+ Solr Verbindung
+
+
+ HTTPS verwenden: (Standard ist "FALSE")
+
+
+
+ Solr Server Host: (Standard ist "localhost")
+
+
+
+ Solr Server Port: (Standard ist "8983")
+
+
+
+ Solr Server Pfad: ohne API-Endpunkt "/solr" (Standard ist "/")
+
+
+
+ Solr Server Benutzername: (Standard ist "")
+
+
+
+ Solr Server Kennwort: (Standard ist "")
+
+
+
+ Solr Server Timeout: (Standard ist "10")
+
+
+
+ Löschen von Solr Kern zulassen?: Soll beim Löschen eines Solr Kerns im TYPO3 Backend auch der entsprechende Index in Apache Solr gelöscht werden? (Standard ist "FALSE")
+
+
+
+ Solr-Schema-Feld "id" : Unique identifier for the document in the id (Standard ist "id")
+
+
+
+ Solr-Schema-Feld "uid" : Unique identifier for the document (or its top-level parent) in the TYPO3 database (Standard ist "uid")
+
+
+
+ Solr-Schema-Feld "pid" : PageID for the document (or its top-level parent) in the TYPO3 database (Standard ist "pid")
+
+
+
+ Solr-Schema-Feld "page" : Image number where this document starts (Standard ist "page")
+
+
+
+ Solr-Schema-Feld "partof" : Unique identifier for the parent document in the TYPO3 database. Only if this is a multi-volume work! (Standard ist "partof")
+
+
+
+ Solr-Schema-Feld "root" : Unique identifier for the root document in the TYPO3 database. Only if this is a multi-volume work! (Standard ist "root")
+
+
+
+ Solr-Schema-Feld "sid" : XML ID of this document in the METS file. This is only unique within the METS file! (Standard ist "sid")
+
+
+
+ Solr-Schema-Feld "toplevel" : Information if it is a top-level document (Standard ist "toplevel")
+
+
+
+ Solr-Schema-Feld "type" : Type of document (eg. monograph, chapter, etc.) (Standard ist "type")
+
+
+
+ Solr-Schema-Feld "title" : Title field is mandatory for identifying documents (Standard ist "title")
+
+
+
+ Solr-Schema-Feld "volume" : Volume field is mandatory for identifying documents (Standard ist "volume")
+
+
+
+ Solr Schema Field "date" : The date a resource was issued or created. Used for datesearch (Standard ist "date")
+
+
+
+ Solr-Schema-Feld "thumbnail" : URL of thumbnail image for the document (Standard ist "thumbnail")
+
+
+
+ Solr-Schema-Feld "default" : CatchAll field (Standard ist "default")
+
+
+
+ Solr-Schema-Feld "timestamp" : (Standard ist "timestamp")
+
+
+
+ Solr-Schema-Feld "autocomplete" : Autocomplete field for search form (Standard ist "autocomplete")
+
+
+
+ Solr-Schema-Feld "fulltext" : Fulltext field for OCR results (Standard ist "fulltext")
+
+
+
+ Solr-Schema-Feld "record_id" : Record ID of the document (required for OAI_DC output) (Standard ist "record_id")
+
+
+
+ Solr-Schema-Feld "purl" : Permanent URL of the document (required for EPICUR output) (Standard ist "purl")
+
+
+
+ Solr-Schema-Feld "urn" : URN of the Document (required for EPICUR output) (Standard ist "urn")
+
+
+
+ Solr-Schema-Feld "location" : Location of METS XML (required for METS output) (Standard ist "location")
+
+
+
+ Solr-Schema-Feld "collection" : Associated collection(s) of the document (Standard ist "collection")
+
+
+
+ Solr-Schema-Feld "license" : License (should be URI) (Standard ist "license")
+
+
+
+ Solr-Schema-Feld "terms" : Term of Use (should be URI) (Standard ist "terms")
+
+
+
+ Solr-Schema-Feld "restrictions" : Access Restrictions (should be URI) (Standard ist "restrictions")
+
+
+
+ Solr-Schema-Feld "geom" : GeoJSON geometry for spatial search (Standard ist "geom")
+
+