Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Classes/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public function getFields(): array
return $this->getSettings();
}

public function getField(string $tableName): string
public function getField(string $tableName): array
{
$settings = $this->getSettings();
return $settings[$tableName] ?? '';
return $settings[$tableName] ?? [];
}

/**
Expand All @@ -38,7 +38,7 @@ protected function getSettings(): array
if (count($split) !== 2) {
continue;
}
$settings[$split[0]] = $split[1];
$settings[$split[0]][] = $split[1];
}
return $settings;
} catch (ExtensionConfigurationExtensionNotConfiguredException $e) {
Expand All @@ -49,4 +49,4 @@ protected function getSettings(): array

return [];
}
}
}
13 changes: 10 additions & 3 deletions Classes/Xclass/XclassedDatabaseRecordList.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@ public function renderListRow($table, array $row, int $indent, array $translatio
}

if ($thumbnailField) {
$fullRow = isset($row[$thumbnailField]) ? $row : BackendUtility::getRecord($table, $row['uid']);
foreach($thumbnailFields as $thumbField){
$thumbnailField = $thumbField;
$fullRow = isset($row[$thumbnailField]) ? $row : BackendUtility::getRecord($table, $row['uid']);

if(!empty($fullRow[$thumbnailField])){
break;
}
}

$thumbCode = '<br />' . BackendUtility::thumbCode($fullRow, $table, $thumbnailField);
$theData[$fCol] .= $thumbCode;
Expand Down Expand Up @@ -158,8 +165,8 @@ static function ($attributeValue) {
return $rowOutput;
}

protected function getThumbnailField(string $tableName): string
protected function getThumbnailField(string $tableName): array
{
return GeneralUtility::makeInstance(Configuration::class)->getField($tableName);
}
}
}