Skip to content

Commit

Permalink
[MAINTENANCE] Don't use file conf as function parameter (#1413)
Browse files Browse the repository at this point in the history
  • Loading branch information
beatrycze-volk authored Dec 20, 2024
1 parent 7f30972 commit 86271a3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Classes/Controller/PageGridController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function mainAction(): ResponseInterface
$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['files']['fileGrpThumbs']);
$foundEntry = $this->getEntry($i);
$foundEntry['state'] = ($i == $this->requestData['page']) ? 'cur' : 'no';
$entryArray[] = $foundEntry;
}
Expand Down Expand Up @@ -79,11 +79,10 @@ public function mainAction(): ResponseInterface
* @access protected
*
* @param int $number The page to render
* @param string $fileGrpThumbs the file group(s) of thumbs
*
* @return array The rendered entry ready for fluid
*/
protected function getEntry(int $number, string $fileGrpThumbs): array
protected function getEntry(int $number): array
{
$entry = [];

Expand All @@ -93,7 +92,7 @@ protected function getEntry(int $number, string $fileGrpThumbs): array
$entry['thumbnail'] = '';

// Get thumbnail or placeholder.
$fileGrpsThumb = GeneralUtility::trimExplode(',', $fileGrpThumbs);
$fileGrpsThumb = GeneralUtility::trimExplode(',', $this->extConf['files']['fileGrpThumbs']);
if (is_array($this->document->getCurrentDocument()->physicalStructureInfo[$this->document->getCurrentDocument()->physicalStructure[$number]]['files'])) {
if (array_intersect($fileGrpsThumb, array_keys($this->document->getCurrentDocument()->physicalStructureInfo[$this->document->getCurrentDocument()->physicalStructure[$number]]['files'])) !== []) {
while ($fileGrpThumb = array_shift($fileGrpsThumb)) {
Expand Down

0 comments on commit 86271a3

Please sign in to comment.