Skip to content

Commit

Permalink
[TASK] save bucket content to variable to retrieve it in the Fluid te…
Browse files Browse the repository at this point in the history
…mplate later
  • Loading branch information
DaRealFreak committed Jul 15, 2022
1 parent a402811 commit ebd99ca
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Classes/FromDataSourcePaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ final class FromDataSourcePaginator extends AbstractPaginator
*/
private string $bucketId;

/**
* @var array
*/
private array $bucketContent;

/**
* @var array
*/
Expand Down Expand Up @@ -85,6 +90,7 @@ public function __construct(
$items = $dataSource->getItemsFromDataSource($bucketContent);

$this->bucketId = $bucketId;
$this->bucketContent = $bucketContent;
$this->items = $items;
$this->setCurrentPageNumber($currentPageNumber);
$this->setItemsPerPage($itemsPerPage);
Expand Down Expand Up @@ -132,13 +138,25 @@ public static function getBucketContentsById(string $bucketId): array
}

/**
* returns the bucket ID
*
* @return string
*/
public function getBucketId(): string
{
return $this->bucketId;
}

/**
* returns the bucket content
*
* @return array
*/
public function getBucketContent(): array
{
return $this->bucketContent;
}

/**
* @return iterable|array
*/
Expand Down

0 comments on commit ebd99ca

Please sign in to comment.